lucene icon indicating copy to clipboard operation
lucene copied to clipboard

Check ahead if we can get the count

Open LuXugang opened this issue 1 year ago • 1 comments

Check whether the IndexSortSortedNumericDocValuesRangeQuery's count can be obtained before traversing the BKD tree or performing binary search using DocValues.

see https://github.com/apache/lucene/issues/13890

LuXugang avatar Oct 12 '24 06:10 LuXugang

The logic makes sense to me but it's a bit hard to read, could we avoid touching getDocIdSetIteratorOrNull and only have new logic in the Weight#count impl?

Thank you for your feedback! @jpountz I really appreciate your suggestion. I’ve made the changes as you recommended

LuXugang avatar Oct 21 '24 09:10 LuXugang