OpenSearch/plugins
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
..
analysis-icu Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
analysis-kuromoji Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
analysis-nori Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
analysis-phonetic Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
analysis-smartcn Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
analysis-stempel Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
analysis-ukrainian Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
discovery-azure-classic Align docs etc with new discovery setting names (#38492) 2019-02-06 11:34:38 +00:00
discovery-ec2 Align docs etc with new discovery setting names (#38492) 2019-02-06 11:34:38 +00:00
discovery-gce Align docs etc with new discovery setting names (#38492) 2019-02-06 11:34:38 +00:00
examples Avoid double term construction in DfsPhase (#38716) 2019-02-15 16:00:38 +00:00
ingest-attachment Update httpclient for JDK 11 TLS engine (#37994) 2019-01-30 14:24:29 -07:00
mapper-annotated-text Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
mapper-murmur3 Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
mapper-size Default include_type_name to false in the yml test harness. (#38058) 2019-02-01 11:44:13 -08:00
repository-azure Remove support for maxRetryTimeout from low-level REST client (#38085) 2019-02-06 08:43:47 +01:00
repository-gcs Update httpclient for JDK 11 TLS engine (#37994) 2019-01-30 14:24:29 -07:00
repository-hdfs TransportVerifyShardBeforeCloseAction should force a flush (#38401) 2019-02-06 13:22:54 +01:00
repository-s3 Update httpclient for JDK 11 TLS engine (#37994) 2019-01-30 14:24:29 -07:00
store-smb Removes typed calls from YAML REST tests (#37611) 2019-01-30 16:32:58 +00:00
transport-nio Extract message serialization from `TcpTransport` (#37034) 2019-01-21 14:14:18 -07:00
build.gradle