Class Lucene99HnswVectorsWriter
- java.lang.Object
-
- org.apache.lucene.codecs.KnnVectorsWriter
-
- org.apache.lucene.codecs.lucene99.Lucene99HnswVectorsWriter
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Accountable
public final class Lucene99HnswVectorsWriter extends KnnVectorsWriter
Writes vector values and knn graphs to index segments.- 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 interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description Lucene99HnswVectorsWriter(SegmentWriteState state, int M, int beamWidth, FlatVectorsWriter flatVectorWriter, int numMergeWorkers, TaskExecutor mergeExec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KnnFieldVectorsWriter<?>addField(FieldInfo fieldInfo)Add new field for indexingvoidclose()voidfinish()Called once at the end before closevoidflush(int maxDoc, Sorter.DocMap sortMap)Flush all buffered data on disk *voidmergeOneField(FieldInfo fieldInfo, MergeState mergeState)Write field for merginglongramBytesUsed()Return the memory usage of this object in bytes.-
Methods inherited from class org.apache.lucene.codecs.KnnVectorsWriter
mapOldOrdToNewOrd, merge
-
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
-
-
-
-
Constructor Detail
-
Lucene99HnswVectorsWriter
public Lucene99HnswVectorsWriter(SegmentWriteState state, int M, int beamWidth, FlatVectorsWriter flatVectorWriter, int numMergeWorkers, TaskExecutor mergeExec) throws IOException
- Throws:
IOException
-
-
Method Detail
-
addField
public KnnFieldVectorsWriter<?> addField(FieldInfo fieldInfo) throws IOException
Description copied from class:KnnVectorsWriterAdd new field for indexing- Specified by:
addFieldin classKnnVectorsWriter- Throws:
IOException
-
flush
public void flush(int maxDoc, Sorter.DocMap sortMap) throws IOExceptionDescription copied from class:KnnVectorsWriterFlush all buffered data on disk *- Specified by:
flushin classKnnVectorsWriter- Throws:
IOException
-
finish
public void finish() throws IOExceptionDescription copied from class:KnnVectorsWriterCalled once at the end before close- Specified by:
finishin classKnnVectorsWriter- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.
-
mergeOneField
public void mergeOneField(FieldInfo fieldInfo, MergeState mergeState) throws IOException
Description copied from class:KnnVectorsWriterWrite field for merging- Overrides:
mergeOneFieldin classKnnVectorsWriter- Throws:
IOException
-
close
public void close() throws IOException- Throws:
IOException
-
-