LuXugang commented on code in PR #792:
URL: https://github.com/apache/lucene/pull/792#discussion_r865502821


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene91/Lucene91HnswVectorsReader.java:
##########
@@ -258,14 +257,20 @@ public TopDocs search(String field, float[] target, int 
k, Bits acceptDocs, int
   }
 
   private OffHeapVectorValues getOffHeapVectorValues(FieldEntry fieldEntry) 
throws IOException {
+    if (fieldEntry.docsWithFieldOffset == -2) {

Review Comment:
   > We could move the getAcceptOrds method to OffHeapVectorValues. This lets 
us remove the check if (vectorValues instanceOf DenseOffHeapVectorValues) { .. 
}.
   
   Really like this suggestion, thanks @jtibshirani  .



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