Module org.apache.lucene.core
Class PerFieldKnnVectorsFormat.FieldsWriter
- java.lang.Object
-
- org.apache.lucene.codecs.KnnVectorsWriter
-
- org.apache.lucene.codecs.perfield.PerFieldKnnVectorsFormat.FieldsWriter
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,Accountable
- Enclosing class:
- PerFieldKnnVectorsFormat
private class PerFieldKnnVectorsFormat.FieldsWriter extends KnnVectorsWriter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.codecs.KnnVectorsWriter
KnnVectorsWriter.MergedVectorValues
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<KnnVectorsFormat,PerFieldKnnVectorsFormat.WriterAndSuffix>
formats
private SegmentWriteState
segmentWriteState
private java.util.Map<java.lang.String,java.lang.Integer>
suffixes
-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description FieldsWriter(SegmentWriteState segmentWriteState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KnnFieldVectorsWriter<?>
addField(FieldInfo fieldInfo)
Add new field for indexingvoid
close()
void
finish()
Called once at the end before closevoid
flush(int maxDoc, Sorter.DocMap sortMap)
Flush all buffered data on disk *private KnnVectorsWriter
getInstance(FieldInfo field)
void
mergeOneField(FieldInfo fieldInfo, MergeState mergeState)
Write field for merginglong
ramBytesUsed()
Return the memory usage of this object in bytes.-
Methods inherited from class org.apache.lucene.codecs.KnnVectorsWriter
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
-
-
-
-
Field Detail
-
formats
private final java.util.Map<KnnVectorsFormat,PerFieldKnnVectorsFormat.WriterAndSuffix> formats
-
suffixes
private final java.util.Map<java.lang.String,java.lang.Integer> suffixes
-
segmentWriteState
private final SegmentWriteState segmentWriteState
-
-
Constructor Detail
-
FieldsWriter
FieldsWriter(SegmentWriteState segmentWriteState)
-
-
Method Detail
-
addField
public KnnFieldVectorsWriter<?> addField(FieldInfo fieldInfo) throws java.io.IOException
Description copied from class:KnnVectorsWriter
Add new field for indexing- Specified by:
addField
in classKnnVectorsWriter
- Throws:
java.io.IOException
-
flush
public void flush(int maxDoc, Sorter.DocMap sortMap) throws java.io.IOException
Description copied from class:KnnVectorsWriter
Flush all buffered data on disk *- Specified by:
flush
in classKnnVectorsWriter
- Throws:
java.io.IOException
-
mergeOneField
public void mergeOneField(FieldInfo fieldInfo, MergeState mergeState) throws java.io.IOException
Description copied from class:KnnVectorsWriter
Write field for merging- Overrides:
mergeOneField
in classKnnVectorsWriter
- Throws:
java.io.IOException
-
finish
public void finish() throws java.io.IOException
Description copied from class:KnnVectorsWriter
Called once at the end before close- Specified by:
finish
in classKnnVectorsWriter
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
getInstance
private KnnVectorsWriter getInstance(FieldInfo field) throws java.io.IOException
- 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.
-
-