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 BytesRef
private final IndexOutput
private final BytesRefBuilder
(package private) static final BytesRef
(package private) static final BytesRef
(package private) static final BytesRef
(package private) static final BytesRef
private final IndexOutput
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
finish()
Called once at the end before closeprivate void
newline
(IndexOutput out) private void
write
(IndexOutput out, String s) private void
write
(IndexOutput out, BytesRef b) void
writeField
(FieldInfo fieldInfo, KnnVectorsReader knnVectorsReader, int maxDoc) Write the provided fieldprivate void
writeField
(IndexOutput out, BytesRef fieldName, int value) private void
writeField
(IndexOutput out, BytesRef fieldName, long value) private void
writeField
(IndexOutput out, BytesRef fieldName, String value) private void
writeInt
(IndexOutput out, int x) private void
writeLong
(IndexOutput out, long x) private void
private void
writeVectorValue
(VectorValues vectors) Methods inherited from class org.apache.lucene.index.BufferingKnnVectorsWriter
addField, flush, mergeOneField, ramBytesUsed
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 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:BufferingKnnVectorsWriter
Write the provided field- Specified by:
writeField
in 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:KnnVectorsWriter
Called once at the end before close- Specified by:
finish
in 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
-