Class Lucene104ScalarQuantizedVectorsWriter
java.lang.Object
org.apache.lucene.codecs.KnnVectorsWriter
org.apache.lucene.codecs.hnsw.FlatVectorsWriter
org.apache.lucene.codecs.lucene104.Lucene104ScalarQuantizedVectorsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,Accountable
Writes quantized vector values and metadata to index segments in the format for Lucene 10.4.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.codecs.KnnVectorsWriter
KnnVectorsWriter.MergedVectorValues -
Field Summary
Fields inherited from class org.apache.lucene.codecs.hnsw.FlatVectorsWriter
vectorsScorerFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
ConstructorsConstructorDescriptionLucene104ScalarQuantizedVectorsWriter(SegmentWriteState state, QuantizedByteVectorValues.ScalarEncoding encoding, FlatVectorsWriter rawVectorDelegate, Lucene104ScalarQuantizedVectorScorer vectorsScorer) Sole constructor -
Method Summary
Modifier and TypeMethodDescriptionAdd a new field for indexingvoidclose()voidfinish()Called once at the end before closevoidflush(int maxDoc, Sorter.DocMap sortMap) Flush all buffered data on disk *voidmergeOneFlatVectorField(FieldInfo fieldInfo, MergeState mergeState) longReturns an estimate of the JVM heap memory used by this object in bytes.Methods inherited from class org.apache.lucene.codecs.hnsw.FlatVectorsWriter
getFlatVectorScorer, mergeOneFieldMethods inherited from class org.apache.lucene.codecs.KnnVectorsWriter
mapOldOrdToNewOrd, mergeMethods 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
-
Constructor Details
-
Lucene104ScalarQuantizedVectorsWriter
public Lucene104ScalarQuantizedVectorsWriter(SegmentWriteState state, QuantizedByteVectorValues.ScalarEncoding encoding, FlatVectorsWriter rawVectorDelegate, Lucene104ScalarQuantizedVectorScorer vectorsScorer) throws IOException Sole constructor- Throws:
IOException
-
-
Method Details
-
addField
Description copied from class:FlatVectorsWriterAdd a new field for indexing- Specified by:
addFieldin classFlatVectorsWriter- Parameters:
fieldInfo- fieldInfo of the field to add- Returns:
- a writer for the field
- Throws:
IOException- if an I/O error occurs when adding the field
-
flush
Description copied from class:KnnVectorsWriterFlush all buffered data on disk *- Specified by:
flushin classKnnVectorsWriter- Throws:
IOException
-
finish
Description copied from class:KnnVectorsWriterCalled once at the end before close- Specified by:
finishin classKnnVectorsWriter- Throws:
IOException
-
mergeOneFlatVectorField
- Specified by:
mergeOneFlatVectorFieldin classFlatVectorsWriter- Throws:
IOException
-
close
- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()Description copied from interface:AccountableReturns an estimate of the JVM heap memory used by this object in bytes. The method name uses "ram" for historical reasons; only JVM heap memory should be reported. Off-heap resources such as memory-mapped files or native direct buffers should not be included. Negative values are illegal.
-