Module org.apache.lucene.core
Package org.apache.lucene.codecs
Class BufferingKnnVectorsWriter.FieldWriter<T>
- java.lang.Object
-
- org.apache.lucene.codecs.KnnFieldVectorsWriter<T>
-
- org.apache.lucene.codecs.BufferingKnnVectorsWriter.FieldWriter<T>
-
- All Implemented Interfaces:
Accountable
- Enclosing class:
- BufferingKnnVectorsWriter
private abstract static class BufferingKnnVectorsWriter.FieldWriter<T> extends KnnFieldVectorsWriter<T>
-
-
Field Summary
Fields Modifier and Type Field Description private int
dim
private DocsWithFieldSet
docsWithField
private FieldInfo
fieldInfo
private int
lastDocID
private java.util.List<T>
vectors
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description FieldWriter(FieldInfo fieldInfo)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addValue(int docID, T value)
Add new docID with its vector value to the given field for indexing.abstract T
copyValue(T vectorValue)
Used to copy values being indexed to internal storage.long
ramBytesUsed()
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 Detail
-
fieldInfo
private final FieldInfo fieldInfo
-
dim
private final int dim
-
docsWithField
private final DocsWithFieldSet docsWithField
-
vectors
private final java.util.List<T> vectors
-
lastDocID
private int lastDocID
-
-
Constructor Detail
-
FieldWriter
FieldWriter(FieldInfo fieldInfo)
-
-
Method Detail
-
addValue
public final void addValue(int docID, T value)
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>
-
copyValue
public abstract T copyValue(T vectorValue)
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
-
ramBytesUsed
public final long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-
-