summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java
diff options
context:
space:
mode:
authorAdrien Grand <jpountz@gmail.com>2016-03-24 18:27:18 +0100
committerAdrien Grand <jpountz@gmail.com>2016-04-01 10:28:58 +0200
commit4c4bbb3e45931c67d4fbdc71cebb7ecd0645eedd (patch)
tree4ea8ee65197e933d50b5df2631ba6ef5b41d0a25 /core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java
parent11fdd2608fa0d060289315755297161a8ffe9c80 (diff)
Replace FieldStatsProvider with a method on MappedFieldType. #17334
FieldStatsProvider had to perform instanceof calls to properly handle dates or ip addresses. By moving the logic to MappedFieldType, each field type can check whether all values are within bounds its way. Note that this commit only keeps rewriting support for dates, which are the only field for which the rewriting mechanism is likely to help (because of time-based indices).
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java')
-rw-r--r--core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java
index 7e4ff9449b..4418fe848a 100644
--- a/core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java
+++ b/core/src/test/java/org/elasticsearch/search/rescore/QueryRescoreBuilderTests.java
@@ -163,7 +163,7 @@ public class QueryRescoreBuilderTests extends ESTestCase {
IndexSettings idxSettings = IndexSettingsModule.newIndexSettings(randomAsciiOfLengthBetween(1, 10), indexSettings);
// shard context will only need indicesQueriesRegistry for building Query objects nested in query rescorer
QueryShardContext mockShardContext = new QueryShardContext(idxSettings, null, null, null, null, null, indicesQueriesRegistry,
- null) {
+ null, null) {
@Override
public MappedFieldType fieldMapper(String name) {
TextFieldMapper.Builder builder = new TextFieldMapper.Builder(name);