Module org.apache.lucene.core
Package org.apache.lucene.codecs
Class BufferingKnnVectorsWriter.FieldWriter<T>
java.lang.Object
org.apache.lucene.codecs.KnnFieldVectorsWriter<T>
org.apache.lucene.codecs.BufferingKnnVectorsWriter.FieldWriter<T>
- All Implemented Interfaces:
Accountable
- Enclosing class:
BufferingKnnVectorsWriter
private abstract static class BufferingKnnVectorsWriter.FieldWriter<T>
extends KnnFieldVectorsWriter<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final DocsWithFieldSetprivate final FieldInfoprivate intFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdd new docID with its vector value to the given field for indexing.abstract TUsed to copy values being indexed to internal storage.final longReturn the memory usage of this object in bytes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
fieldInfo
-
dim
private final int dim -
docsWithField
-
vectors
-
lastDocID
private int lastDocID
-
-
Constructor Details
-
FieldWriter
FieldWriter(FieldInfo fieldInfo)
-
-
Method Details
-
addValue
Description copied from class:KnnFieldVectorsWriterAdd new docID with its vector value to the given field for indexing. Doc IDs must be added in increasing order.- Specified by:
addValuein classKnnFieldVectorsWriter<T>
-
copyValue
Description copied from class:KnnFieldVectorsWriterUsed to copy values being indexed to internal storage.- Specified by:
copyValuein classKnnFieldVectorsWriter<T>- Parameters:
vectorValue- an array containing the vector value to add- Returns:
- a copy of the value; a new array
-
ramBytesUsed
public final long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-