Class SimpleTextKnnVectorsWriter
java.lang.Object
org.apache.lucene.codecs.KnnVectorsWriter
org.apache.lucene.codecs.simpletext.SimpleTextKnnVectorsWriter
- All Implemented Interfaces:
Closeable
,AutoCloseable
Writes vector-valued fields in a plain text format
-
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
-
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) Write all values contained in the provided readerprivate 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.codecs.KnnVectorsWriter
merge
-
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
Description copied from class:KnnVectorsWriter
Write all values contained in the provided reader- Specified by:
writeField
in classKnnVectorsWriter
- 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
-