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 int
private final DocsWithFieldSet
private final FieldInfo
private final HnswGraphBuilder<T>
private int
private int
Fields 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 TypeMethodDescriptionvoid
Add 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) OnHeapHnswGraph
getGraph()
long
Return the memory usage of this object in bytes.Methods inherited from class org.apache.lucene.codecs.KnnFieldVectorsWriter
copyValue
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
-
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: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<T>
- Throws:
IOException
-
getGraph
OnHeapHnswGraph getGraph() -
ramBytesUsed
public long ramBytesUsed()Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-