jpountz commented on code in PR #15011: URL: https://github.com/apache/lucene/pull/15011#discussion_r2270139493
########## lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99HnswVectorsReader.java: ########## @@ -332,14 +333,15 @@ private void search( final RandomVectorScorer scorer = scorerSupplier.get(); final KnnCollector collector = new OrdinalTranslatedKnnCollector(knnCollector, scorer::ordToDoc); - final Bits acceptedOrds = scorer.getAcceptOrds(acceptDocs); + Bits accepted = acceptDocs.bits(); + final Bits acceptedOrds = scorer.getAcceptOrds(accepted); HnswGraph graph = getGraph(fieldEntry); boolean doHnsw = knnCollector.k() < scorer.maxOrd(); // Take into account if quantized? E.g. some scorer cost? int filteredDocCount = 0; // The approximate number of vectors that would be visited if we did not filter int unfilteredVisit = HnswGraphSearcher.expectedVisitedNodes(knnCollector.k(), graph.size()); - if (acceptDocs instanceof BitSet bitSet) { + if (accepted instanceof BitSet bitSet) { Review Comment: I agree it's better to do this in this PR than in a follow-up. @shubhamvishu would you like to fix this? -- 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