lucene
lucene copied to clipboard
Check ahead if we can get the count
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
The logic makes sense to me but it's a bit hard to read, could we avoid touching
getDocIdSetIteratorOrNulland only have new logic in theWeight#countimpl?
Thank you for your feedback! @jpountz I really appreciate your suggestion. I’ve made the changes as you recommended