Package org.apache.lucene.index
Class BufferingKnnVectorsWriter.FieldWriter
java.lang.Object
org.apache.lucene.codecs.KnnFieldVectorsWriter<float[]>
org.apache.lucene.index.BufferingKnnVectorsWriter.FieldWriter
- All Implemented Interfaces:
Accountable
- Enclosing class:
- BufferingKnnVectorsWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final DocsWithFieldSet
private final FieldInfo
private int
private final List<float[]>
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add new docID with its vector value to the given field for indexing.private float[]
float[]
copyValue
(float[] vectorValue) Used to copy values being indexed to internal storage.long
Return 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, wait
Methods 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
-
-
Method Details
-
addValue
Description copied from class:KnnFieldVectorsWriter
Add new docID with its vector value to the given field for indexing. Doc IDs must be added in increasing order.- Specified by:
addValue
in classKnnFieldVectorsWriter<float[]>
-
bytesToFloats
-
copyValue
public float[] copyValue(float[] vectorValue) Description copied from class:KnnFieldVectorsWriter
Used to copy values being indexed to internal storage.- Specified by:
copyValue
in classKnnFieldVectorsWriter<float[]>
- Parameters:
vectorValue
- an array containing the vector value to add- Returns:
- a copy of the value; a new array
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-