mayya-sharipova commented on code in PR #992:
URL: https://github.com/apache/lucene/pull/992#discussion_r914172262
##########
lucene/core/src/java/org/apache/lucene/codecs/lucene93/Lucene93HnswVectorsWriter.java:
##########
@@ -116,7 +119,193 @@ public final class Lucene93HnswVectorsWriter extends
KnnVectorsWriter {
}
@Override
- public void writeField(FieldInfo fieldInfo, KnnVectorsReader
knnVectorsReader)
+ public void addField(FieldInfo fieldInfo) throws IOException {
+ if (fields == null) {
+ fields = new FieldData[1];
+ } else {
+ FieldData[] newFields = new FieldData[fields.length + 1];
+ System.arraycopy(fields, 0, newFields, 0, fields.length);
+ fields = newFields;
+ }
+ fields[fields.length - 1] =
+ new FieldData(fieldInfo, M, beamWidth, segmentWriteState.infoStream);
+ }
+
+ @Override
+ public void addValue(FieldInfo fieldInfo, int docID, float[] vectorValue)
throws IOException {
+ for (FieldData field : fields) {
Review Comment:
No longer relevant, as in 2f58350081902bfc13cb02424343ab805c02b0a5 we use
`addValue` for `KnnFieldVectorsWriter`.
--
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]