New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single value numeric queries shouldn't be handled by NumericRangeQuery #10648
Conversation
LGTM |
Working on a change to address termFilter too... |
…y and should use a TermQuery wrapped in a ConstantScoreQuery instead. Closes #10646
…hanged to a final impl in NumericFieldMapper based on TermFilter.
@rmuir Can I get a review of this now that I've added termFilter support? |
This change looks great to me. Its very important for master where otherwise we'd always read all the postings for the term into a bitset in memory, which is bad if we are e.g. AND'ing with a bunch of other clauses. Even for older branches, we would sometimes do this if the term has a high docfreq (which is exactly when you do not want to do this). So it is best to explicitly make term query/filters instead. I also like the internal cleanup, +1. |
Thanks @rmuir - which branches would you like to see have this? |
I think we should do 2.0 and 1.6 personally. Its not technically a bug, so I would omit from 1.5.2 just to be on the safe side. |
OK - I'll push to 1.x and master if there are no objections |
+1 on master and 1.x |
+1 |
For performance reasons this change uses a TermQuery wrapped in a ConstantScoreQuery instead of a NumericRangeQuery with start and end values the same.
Closes #10646