jtibshirani commented on a change in pull request #649:
URL: https://github.com/apache/lucene/pull/649#discussion_r799925962



##########
File path: 
lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsWriter.java
##########
@@ -140,7 +142,10 @@ public void writeField(FieldInfo fieldInfo, 
KnnVectorsReader knnVectorsReader)
       // build the graph using the temporary vector data
       Lucene91HnswVectorsReader.OffHeapVectorValues offHeapVectors =
           new Lucene91HnswVectorsReader.OffHeapVectorValues(
-              vectors.dimension(), docIds, vectorDataInput);
+              vectors.dimension(),
+              docsWithField.cardinality(),
+              null, // graph construction doesn't need to know docIds

Review comment:
       hmm this feels a little fragile. I see how it's hard to improve though, 
since the random access and iterator functionality is tied together in a single 
class.

##########
File path: 
lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsReader.java
##########
@@ -311,7 +313,9 @@ public void close() throws IOException {
     final int maxConn;
     final int numLevels;
     final int dimension;
+    private final int size;
     final int[] ordToDoc;
+    final IntUnaryOperator ordToDocOperator;

Review comment:
       We could make this `private` since it doesn't need to be accessed 
externally.




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