You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Various clauses in the Query DSL allow criteria that matches a single numeric term and these are resolved behind the scenes by calling NumericFieldMapper.termQuery().
Currently all subclasses of NumericFieldMapper implement this method by returning a NumericRangeQuery with the same start and end value. Instead it would be more efficient to return a TermQuery wrapped in a ConstantScoreQuery.
As well as providing a performance improvement this change will lay the foundations for #10628 which will add an option to use the TermQueries, unwrapped, to allow numeric fields to make use of the usual Lucene ranking behaviour (IDF + norms).
The text was updated successfully, but these errors were encountered:
…by NumericRangeQuery.
They should use a ConstantScoreQuery wrapping a TermQuery as this is more efficient.
Similarly, single value numeric filters shouldn’t use a NumericRangeFilter
Closes#10646
Various clauses in the Query DSL allow criteria that matches a single numeric term and these are resolved behind the scenes by calling NumericFieldMapper.termQuery().
Currently all subclasses of NumericFieldMapper implement this method by returning a NumericRangeQuery with the same start and end value. Instead it would be more efficient to return a TermQuery wrapped in a ConstantScoreQuery.
As well as providing a performance improvement this change will lay the foundations for #10628 which will add an option to use the TermQueries, unwrapped, to allow numeric fields to make use of the usual Lucene ranking behaviour (IDF + norms).
The text was updated successfully, but these errors were encountered: