OpenSearch/plugins/examples
Alan Woodward 176013e23c Avoid double term construction in DfsPhase (#38716)
DfsPhase captures terms used for scoring a query in order to build global term statistics across
multiple shards for more accurate scoring. It currently does this by building the query's `Weight`
and calling `extractTerms` on it to collect terms, and then calling `IndexSearcher.termStatistics()`
for each collected term. This duplicates work, however, as the various `Weight` implementations 
will already have collected these statistics at construction time.

This commit replaces this round-about way of collecting stats, instead using a delegating
IndexSearcher that collects the term contexts and statistics when `IndexSearcher.termStatistics()`
is called from the Weight.

It also fixes a bug when using rescorers, where a `QueryRescorer` would calculate distributed term
statistics, but ignore field statistics.  `Rescorer.extractTerms` has been removed, and replaced with
a new method on `RescoreContext` that returns any queries used by the rescore implementation.
The delegating IndexSearcher then collects term contexts and statistics in the same way described
above for each Query.
2019-02-15 16:00:38 +00:00
..
custom-settings Separate out validation of groups of settings (#34184) 2019-01-07 16:12:58 +00:00
custom-suggester Removes typed calls from YAML REST tests (#37611) 2019-01-30 16:32:58 +00:00
painless-whitelist Removes typed calls from YAML REST tests (#37611) 2019-01-30 16:32:58 +00:00
rescore Avoid double term construction in DfsPhase (#38716) 2019-02-15 16:00:38 +00:00
rest-handler Testing conventions: add support for checking base classes (#36650) 2019-01-08 13:39:03 +02:00
script-expert-scoring Removes typed calls from YAML REST tests (#37611) 2019-01-30 16:32:58 +00:00
security-authorization-engine Allow custom authorization with an authorization engine (#38358) 2019-02-05 13:39:29 -07:00
build.gradle Disable assemble task instead of removing it (#33348) 2018-09-04 07:32:14 +03:00