jtibshirani commented on code in PR #932: URL: https://github.com/apache/lucene/pull/932#discussion_r932513152
########## lucene/core/src/test/org/apache/lucene/util/hnsw/KnnGraphTester.java: ########## @@ -91,6 +101,9 @@ public class KnnGraphTester { private int beamWidth; private int maxConn; private VectorSimilarityFunction similarityFunction; + private FixedBitSet matchDocs; + private float selectivity; + private boolean prefilter; @SuppressForbidden(reason = "uses Random()") Review Comment: hmm, not related to your PR but maybe we could remove this suppression as a clean-up. ########## lucene/core/src/test/org/apache/lucene/util/hnsw/KnnGraphTester.java: ########## @@ -192,6 +207,18 @@ private void run(String... args) throws Exception { case "-forceMerge": forceMerge = true; break; + case "-prefilter": + prefilter = true; + break; + case "-filterSelectivity": + if (iarg == args.length - 1) { + throw new IllegalArgumentException("-filterSelectivity requires a following float"); + } + selectivity = Float.parseFloat(args[++iarg]); Review Comment: Maybe we could also assert that if `prefilter = true`, then `filterSelectivity < 1f`. Because otherwise you could accidentally set `prefilter` without setting a selectivity, which doesn't make much sense. -- 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