Module org.apache.lucene.core
Class Lucene99FlatVectorsWriter.FieldWriter<T>
java.lang.Object
org.apache.lucene.codecs.KnnFieldVectorsWriter<T>
org.apache.lucene.codecs.hnsw.FlatFieldVectorsWriter<T>
org.apache.lucene.codecs.lucene99.Lucene99FlatVectorsWriter.FieldWriter<T>
- All Implemented Interfaces:
Accountable
- Enclosing class:
Lucene99FlatVectorsWriter
private abstract static class Lucene99FlatVectorsWriter.FieldWriter<T>
extends FlatFieldVectorsWriter<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final DocsWithFieldSet
private final FieldInfo
private boolean
private int
private static final long
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add new docID with its vector value to the given field for indexing.(package private) static Lucene99FlatVectorsWriter.FieldWriter
<?> void
finish()
indicates that this writer is done and no new vectors are allowed to be addedboolean
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
-
SHALLOW_RAM_BYTES_USED
private static final long SHALLOW_RAM_BYTES_USED -
fieldInfo
-
dim
private final int dim -
docsWithField
-
vectors
-
finished
private boolean finished -
lastDocID
private int lastDocID
-
-
Constructor Details
-
FieldWriter
FieldWriter(FieldInfo fieldInfo)
-
-
Method Details
-
create
-
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
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal. -
getVectors
- Specified by:
getVectors
in classFlatFieldVectorsWriter<T>
- Returns:
- a list of vectors to be written
-
getDocsWithFieldSet
- Specified by:
getDocsWithFieldSet
in classFlatFieldVectorsWriter<T>
- Returns:
- the docsWithFieldSet for the field writer
-
finish
Description copied from class:FlatFieldVectorsWriter
indicates that this writer is done and no new vectors are allowed to be added- Specified by:
finish
in classFlatFieldVectorsWriter<T>
- Throws:
IOException
- if an I/O error occurs
-
isFinished
public boolean isFinished()- Specified by:
isFinished
in classFlatFieldVectorsWriter<T>
- Returns:
- true if the writer is done and no new vectors are allowed to be added
-