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
Fields Modifier and Type Field Description private int
dim
private DocsWithFieldSet
docsWithField
private FieldInfo
fieldInfo
private int
lastDocID
private static long
SHALLOW_RAM_BYTES_USED
private java.util.List<T>
vectors
-
Fields inherited from class org.apache.lucene.codecs.hnsw.FlatFieldVectorsWriter
indexingDelegate
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description FieldWriter(FieldInfo fieldInfo, KnnFieldVectorsWriter<T> indexWriter)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(int docID, T vectorValue)
Add new docID with its vector value to the given field for indexing.(package private) static Lucene99FlatVectorsWriter.FieldWriter<?>
create(FieldInfo fieldInfo, KnnFieldVectorsWriter<?> indexWriter)
long
ramBytesUsed()
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 Detail
-
SHALLOW_RAM_BYTES_USED
private static final long SHALLOW_RAM_BYTES_USED
-
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, KnnFieldVectorsWriter<T> indexWriter)
-
-
Method Detail
-
create
static Lucene99FlatVectorsWriter.FieldWriter<?> create(FieldInfo fieldInfo, KnnFieldVectorsWriter<?> indexWriter)
-
addValue
public void addValue(int docID, T vectorValue) throws java.io.IOException
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:
java.io.IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-
-