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 intprivate final DocsWithFieldSetprivate final FieldInfoprivate booleanprivate intprivate static final longFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd new docID with its vector value to the given field for indexing.(package private) static Lucene99FlatVectorsWriter.FieldWriter<?> voidfinish()indicates that this writer is done and no new vectors are allowed to be addedbooleanlongReturn 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
-
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: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
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal. -
getVectors
- Specified by:
getVectorsin classFlatFieldVectorsWriter<T>- Returns:
- a list of vectors to be written
-
getDocsWithFieldSet
- Specified by:
getDocsWithFieldSetin classFlatFieldVectorsWriter<T>- Returns:
- the docsWithFieldSet for the field writer
-
finish
Description copied from class:FlatFieldVectorsWriterindicates that this writer is done and no new vectors are allowed to be added- Specified by:
finishin classFlatFieldVectorsWriter<T>- Throws:
IOException- if an I/O error occurs
-
isFinished
public boolean isFinished()- Specified by:
isFinishedin classFlatFieldVectorsWriter<T>- Returns:
- true if the writer is done and no new vectors are allowed to be added
-