Module org.apache.lucene.core
Class Lucene99HnswVectorsWriter.FieldWriter<T>
java.lang.Object
org.apache.lucene.codecs.KnnFieldVectorsWriter<T>
org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsWriter.FieldWriter<T>
- All Implemented Interfaces:
Accountable
- Enclosing class:
Lucene99HnswVectorsWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DocsWithFieldSetprivate final FieldInfoprivate final HnswGraphBuilderprivate intprivate intprivate static final longFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionFieldWriter(FlatVectorsScorer scorer, FieldInfo fieldInfo, int M, int beamWidth, InfoStream infoStream) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd new docID with its vector value to the given field for indexing.Used to copy values being indexed to internal storage.(package private) static Lucene99HnswVectorsWriter.FieldWriter<?> create(FlatVectorsScorer scorer, FieldInfo fieldInfo, int M, int beamWidth, InfoStream infoStream) (package private) OnHeapHnswGraphgetGraph()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
-
SHALLOW_SIZE
private static final long SHALLOW_SIZE -
fieldInfo
-
docsWithField
-
vectors
-
hnswGraphBuilder
-
lastDocID
private int lastDocID -
node
private int node
-
-
Constructor Details
-
FieldWriter
FieldWriter(FlatVectorsScorer scorer, FieldInfo fieldInfo, int M, int beamWidth, InfoStream infoStream) throws IOException - Throws:
IOException
-
-
Method Details
-
create
static Lucene99HnswVectorsWriter.FieldWriter<?> create(FlatVectorsScorer scorer, FieldInfo fieldInfo, int M, int beamWidth, InfoStream infoStream) throws IOException - Throws:
IOException
-
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>- Throws:
IOException
-
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
-
getGraph
OnHeapHnswGraph getGraph() -
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-