jtibshirani commented on code in PR #932:
URL: https://github.com/apache/lucene/pull/932#discussion_r888237781
##########
lucene/core/src/java/org/apache/lucene/search/KnnVectorQuery.java:
##########
@@ -225,6 +225,11 @@ public BitSetIterator getIterator(int contextOrd) {
return new BitSetIterator(bitSets[contextOrd], cost[contextOrd]);
}
+ public void setBitSet(BitSet bitSet, int cost) {
+ bitSets[ord] = bitSet;
Review Comment:
I am surprised that iterating and copying the `BitSet` is so expensive --
would you up for sharing some numbers with and without the copying? It might
give ideas for optimizations.
One idea just for this test: you could create a custom `LeafReader` that
folds the filter bit set into the live docs. You can seen example of overriding
the live docs in `NoLiveDocsDirectoryReader` from `TestKnnVectorQuery`. This is
a bit hacky but doesn't feel too bad as a well-scoped approach for testing?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]