OpenSearch/server
Alan Woodward 18663b0a85 Don't index ranges including NOW in percolator (#52748)
Currently, date ranges queries using NOW-based date math are rewritten to
MatchAllDocs queries when being preprocessed for the percolator. However,
since we added the verification step, this can result in incorrect matches when
percolator queries are run without scores. This commit changes things to instead
wrap date queries that use NOW with a new DateRangeIncludingNowQuery.
This is a simple wrapper query that returns its delegate at rewrite time, but it can
be detected by the percolator QueryAnalyzer and be dealt with accordingly.

This also allows us to remove a method on QueryRewriteContext, and push all
logic relating to NOW-based ranges into the DateFieldMapper.

Fixes #52617
2020-02-25 12:18:16 +00:00
..
licenses Upgrade Lucene to 8.5.0-snapshot-b01d7cb (#52584) 2020-02-21 10:25:03 +00:00
src Don't index ranges including NOW in percolator (#52748) 2020-02-25 12:18:16 +00:00
build.gradle Upgrade to lucene-8.5.0-snapshot-3333ce7da6d (#51749) 2020-01-31 11:20:15 -05:00