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 DocsWithFieldSet
private final FieldInfo
private final HnswGraphBuilder
private int
private int
private static final long
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.Used to copy values being indexed to internal storage.(package private) static Lucene99HnswVectorsWriter.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 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
-
SHALLOW_SIZE
private static final long SHALLOW_SIZE -
fieldInfo
-
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 Lucene99HnswVectorsWriter.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
-
copyValue
Description copied from class:KnnFieldVectorsWriter
Used to copy values being indexed to internal storage.- Specified by:
copyValue
in 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:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-