Re: AbstractMultiTermQueryConstantScoreWrapper cost estimates (https://github.com/apache/lucene/issues/13029)

2024-08-02 Thread Michael Froh
Incidentally, speaking as someone with only a superficial understanding of how the FSTs work, I'm wondering if there is risk of cost in expanding the first few terms. Say we have a million terms, but only one contains an 'a'. If someone searches for '*a*', does that devolve into a term scan? Or ca

Re: AbstractMultiTermQueryConstantScoreWrapper cost estimates (https://github.com/apache/lucene/issues/13029)

2024-08-02 Thread Michael Froh
Exactly! My initial implementation added some potential cost. (I think I enumerated up to 128 terms before giving up.) Now that Mayya moved the (probably tiny) cost of expanding the first 16 terms upfront, my change is theoretically "free". Froh On Fri, Aug 2, 2024 at 3:25 PM Greg Miller wrote:

Re: AbstractMultiTermQueryConstantScoreWrapper cost estimates (https://github.com/apache/lucene/issues/13029)

2024-08-02 Thread Greg Miller
Hey Froh- I got some time to look through your PR (most of the time was actually refreshing my memory on the change history leading up to your PR and digesting the issue described). I think this makes a ton of sense. If I'm understanding properly, the latest version of your PR essentially takes ad