Module org.apache.lucene.core
Class Lucene99ScalarQuantizedVectorsWriter.FieldWriter
- java.lang.Object
-
- org.apache.lucene.codecs.KnnFieldVectorsWriter<T>
-
- org.apache.lucene.codecs.FlatFieldVectorsWriter<float[]>
-
- org.apache.lucene.codecs.lucene99.Lucene99ScalarQuantizedVectorsWriter.FieldWriter
-
- All Implemented Interfaces:
Accountable
- Enclosing class:
- Lucene99ScalarQuantizedVectorsWriter
static class Lucene99ScalarQuantizedVectorsWriter.FieldWriter extends FlatFieldVectorsWriter<float[]>
-
-
Field Summary
Fields Modifier and Type Field Description private float
confidenceInterval
private DocsWithFieldSet
docsWithField
private FieldInfo
fieldInfo
private boolean
finished
private java.util.List<float[]>
floatVectors
private InfoStream
infoStream
private float
maxQuantile
private float
minQuantile
private boolean
normalize
private static long
SHALLOW_SIZE
-
Fields inherited from class org.apache.lucene.codecs.FlatFieldVectorsWriter
indexingDelegate
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description FieldWriter(float confidenceInterval, FieldInfo fieldInfo, InfoStream infoStream, KnnFieldVectorsWriter<?> indexWriter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(int docID, float[] vectorValue)
Add new docID with its vector value to the given field for indexing.float[]
copyValue(float[] vectorValue)
Used to copy values being indexed to internal storage.(package private) ScalarQuantizer
createQuantizer()
(package private) void
finish()
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
-
SHALLOW_SIZE
private static final long SHALLOW_SIZE
-
floatVectors
private final java.util.List<float[]> floatVectors
-
fieldInfo
private final FieldInfo fieldInfo
-
confidenceInterval
private final float confidenceInterval
-
infoStream
private final InfoStream infoStream
-
normalize
private final boolean normalize
-
minQuantile
private float minQuantile
-
maxQuantile
private float maxQuantile
-
finished
private boolean finished
-
docsWithField
private final DocsWithFieldSet docsWithField
-
-
Constructor Detail
-
FieldWriter
FieldWriter(float confidenceInterval, FieldInfo fieldInfo, InfoStream infoStream, KnnFieldVectorsWriter<?> indexWriter)
-
-
Method Detail
-
finish
void finish() throws java.io.IOException
- Throws:
java.io.IOException
-
createQuantizer
ScalarQuantizer createQuantizer()
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.
-
addValue
public void addValue(int docID, float[] 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<float[]>
- Throws:
java.io.IOException
-
copyValue
public float[] copyValue(float[] vectorValue)
Description copied from class:KnnFieldVectorsWriter
Used to copy values being indexed to internal storage.- Specified by:
copyValue
in classKnnFieldVectorsWriter<float[]>
- Parameters:
vectorValue
- an array containing the vector value to add- Returns:
- a copy of the value; a new array
-
-