Module org.apache.lucene.core
Class Lucene95HnswVectorsWriter.FieldWriter<T>
java.lang.Object
org.apache.lucene.codecs.KnnFieldVectorsWriter<T>
org.apache.lucene.codecs.lucene95.Lucene95HnswVectorsWriter.FieldWriter<T>
- All Implemented Interfaces:
Accountable
- Enclosing class:
- Lucene95HnswVectorsWriter
private abstract static class Lucene95HnswVectorsWriter.FieldWriter<T>
extends KnnFieldVectorsWriter<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final DocsWithFieldSetprivate final FieldInfoprivate final HnswGraphBuilder<T>private intprivate intFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionFieldWriter(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.(package private) static Lucene95HnswVectorsWriter.FieldWriter<?>create(FieldInfo fieldInfo, int M, int beamWidth, InfoStream infoStream) (package private) OnHeapHnswGraphgetGraph()longReturn the memory usage of this object in bytes.Methods inherited from class org.apache.lucene.codecs.KnnFieldVectorsWriter
copyValueMethods 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
-
hnswGraphBuilder
-
lastDocID
private int lastDocID -
node
private int node
-
-
Constructor Details
-
FieldWriter
FieldWriter(FieldInfo fieldInfo, int M, int beamWidth, InfoStream infoStream) throws IOException - Throws:
IOException
-
-
Method Details
-
create
static Lucene95HnswVectorsWriter.FieldWriter<?> create(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
-
getGraph
OnHeapHnswGraph getGraph() -
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-