Class SimpleTextKnnVectorsWriter
java.lang.Object
org.apache.lucene.codecs.KnnVectorsWriter
org.apache.lucene.index.BufferingKnnVectorsWriter
org.apache.lucene.codecs.simpletext.SimpleTextKnnVectorsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,Accountable
Writes vector-valued fields in a plain text format
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.codecs.KnnVectorsWriter
KnnVectorsWriter.MergedVectorValues -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final BytesRef(package private) static final BytesRefprivate final IndexOutputprivate final BytesRefBuilder(package private) static final BytesRef(package private) static final BytesRef(package private) static final BytesRef(package private) static final BytesRefprivate final IndexOutputFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfinish()Called once at the end before closeprivate voidnewline(IndexOutput out) private voidwrite(IndexOutput out, String s) private voidwrite(IndexOutput out, BytesRef b) voidwriteField(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader, int maxDoc) Write the provided fieldprivate voidwriteField(IndexOutput out, BytesRef fieldName, int value) private voidwriteField(IndexOutput out, BytesRef fieldName, long value) private voidwriteField(IndexOutput out, BytesRef fieldName, String value) private voidwriteInt(IndexOutput out, int x) private voidwriteLong(IndexOutput out, long x) private voidprivate voidwriteVectorValue(VectorValues vectors) Methods inherited from class org.apache.lucene.index.BufferingKnnVectorsWriter
addField, flush, mergeOneField, ramBytesUsedMethods inherited from class org.apache.lucene.codecs.KnnVectorsWriter
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
-
Field Details
-
FIELD_NUMBER
-
FIELD_NAME
-
VECTOR_DATA_OFFSET
-
VECTOR_DATA_LENGTH
-
VECTOR_DIMENSION
-
SIZE
-
meta
-
vectorData
-
scratch
-
-
Constructor Details
-
SimpleTextKnnVectorsWriter
SimpleTextKnnVectorsWriter(SegmentWriteState state) throws IOException - Throws:
IOException
-
-
Method Details
-
writeField
public void writeField(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader, int maxDoc) throws IOException Description copied from class:BufferingKnnVectorsWriterWrite the provided field- Specified by:
writeFieldin classBufferingKnnVectorsWriter- Throws:
IOException
-
writeVectorValue
- Throws:
IOException
-
writeMeta
private void writeMeta(FieldInfo field, long vectorDataOffset, long vectorDataLength, List<Integer> docIds) throws IOException - Throws:
IOException
-
finish
Description copied from class:KnnVectorsWriterCalled once at the end before close- Specified by:
finishin classKnnVectorsWriter- Throws:
IOException
-
close
- Throws:
IOException
-
writeField
- Throws:
IOException
-
writeField
- Throws:
IOException
-
writeField
- Throws:
IOException
-
write
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
write
- Throws:
IOException
-
newline
- Throws:
IOException
-