rmuir commented on code in PR #17047:
URL: https://github.com/apache/lucene/pull/17047#discussion_r4636577416
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsWriter.java:
##########
@@ -332,6 +342,141 @@ public void mergeOneFlatVectorField(FieldInfo fieldInfo,
MergeState mergeState)
docsWithField);
}
+ /**
+ * Merges a field by copying the stored bytes of each source segment's
vectors, without decoding
+ * and re-encoding them. Every source must expose the field through one of
the off-heap value
+ * classes that this format's reader creates, which read vector {@code ord}
as the {@code
+ * vectorByteLength} little-endian bytes at {@code ord * vectorByteLength}
of their slice: exactly
+ * what the per-vector path would write.
+ *
+ * <p>Documents are visited in the same order as {@code
KnnVectorsWriter.MergedVectorValues}, and
+ * runs of consecutive live ordinals are copied in one call.
+ *
+ * @return the merged documents with a vector, or {@code null}, having
written nothing, if the
+ * merge sorts documents or any source does not qualify
+ */
+ private DocsWithFieldSet copyRawVectorData(FieldInfo fieldInfo, MergeState
mergeState)
Review Comment:
before copying raw bytes, can we do version checks? these are done elsewhere
in the existing bulk copies for e.g. stored fields.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]