mayya-sharipova commented on code in PR #992:
URL: https://github.com/apache/lucene/pull/992#discussion_r924809132


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene93/Lucene93HnswVectorsWriter.java:
##########
@@ -116,7 +120,236 @@ public final class Lucene93HnswVectorsWriter extends 
KnnVectorsWriter {
   }
 
   @Override
-  public void writeField(FieldInfo fieldInfo, KnnVectorsReader 
knnVectorsReader)
+  public KnnFieldVectorsWriter addField(FieldInfo fieldInfo) throws 
IOException {
+    if (fields == null) {
+      fields = new FieldWriter[1];
+    } else {
+      FieldWriter[] newFields = new FieldWriter[fields.length + 1];
+      System.arraycopy(fields, 0, newFields, 0, fields.length);
+      fields = newFields;
+    }

Review Comment:
   Good comment, addressed in bc94f9e7de9e5db705c4e1cb1bddb9e9f73dd78c. 
   
    I assumed for most cases a user will have just a single vector field in an 
index, but it is better to prepare for some strange cases.



-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to