zacharymorn commented on a change in pull request #534:
URL: https://github.com/apache/lucene/pull/534#discussion_r777817835



##########
File path: lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsWriter.java
##########
@@ -107,7 +110,36 @@ private void mergeVectors(FieldInfo mergeFieldInfo, final 
MergeState mergeState)
     }
     // Create a new VectorValues by iterating over the sub vectors, mapping 
the resulting
     // docids using docMaps in the mergeState.
-    writeField(mergeFieldInfo, new VectorValuesMerger(subs, mergeState));
+    writeField(
+        mergeFieldInfo,
+        new KnnVectorsReader() {
+          @Override
+          public long ramBytesUsed() {
+            return 0;
+          }
+
+          @Override
+          public void close() throws IOException {
+            throw new UnsupportedOperationException();
+          }
+
+          @Override
+          public void checkIntegrity() throws IOException {
+            throw new UnsupportedOperationException();
+          }
+
+          @Override
+          public VectorValues getVectorValues(String field) throws IOException 
{
+            return new VectorValuesMerger(subs, mergeState);

Review comment:
       Ops sorry, I should have realized this when fixing for 
`VectorValuesWriter`. I've fixed this one as well and asserted for new 
`VectorValues` to be created upon calls in a test.




-- 
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