diff options
author | Masaru Hasegawa <haniomasali@gmail.com> | 2016-11-07 17:20:06 +0900 |
---|---|---|
committer | Masaru Hasegawa <haniomasali@gmail.com> | 2016-12-11 21:41:49 +0900 |
commit | 3df2a086d4bf3c5608aabf06c1766e10c901af35 (patch) | |
tree | 3bcd97ab87fd8399548b261c988ee51a292d53d0 /core/src/test/java/org/elasticsearch/search/SearchServiceTests.java | |
parent | 20ff703e07c692c5e68e6b30a6e6413a34dd10a7 (diff) |
Resolve index names in indices_boost
This change allows specifying alias/wildcard expression in indices_boost.
And added another format for specifying indices_boost. It accepts array of index name and boost pair.
If an index is included in multiple aliases/wildcard expressions, the first match will be used.
With new format, old format is marked as deprecated.
Closes #4756
Diffstat (limited to 'core/src/test/java/org/elasticsearch/search/SearchServiceTests.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/search/SearchServiceTests.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java b/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java index 2db44c9d0b..13751ae453 100644 --- a/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java +++ b/core/src/test/java/org/elasticsearch/search/SearchServiceTests.java @@ -185,7 +185,7 @@ public class SearchServiceTests extends ESSingleNodeTestCase { try { QuerySearchResultProvider querySearchResultProvider = service.executeQueryPhase( new ShardSearchLocalRequest(indexShard.shardId(), 1, SearchType.DEFAULT, - new SearchSourceBuilder(), new String[0], false, new AliasFilter(null, Strings.EMPTY_ARRAY)), + new SearchSourceBuilder(), new String[0], false, new AliasFilter(null, Strings.EMPTY_ARRAY), 1.0f), new SearchTask(123L, "", "", "", null)); IntArrayList intCursors = new IntArrayList(1); intCursors.add(0); @@ -220,7 +220,8 @@ public class SearchServiceTests extends ESSingleNodeTestCase { new SearchSourceBuilder(), new String[0], false, - new AliasFilter(null, Strings.EMPTY_ARRAY)), + new AliasFilter(null, Strings.EMPTY_ARRAY), + 1.0f), null); // the search context should inherit the default timeout assertThat(contextWithDefaultTimeout.timeout(), equalTo(TimeValue.timeValueSeconds(5))); @@ -234,7 +235,8 @@ public class SearchServiceTests extends ESSingleNodeTestCase { new SearchSourceBuilder().timeout(TimeValue.timeValueSeconds(seconds)), new String[0], false, - new AliasFilter(null, Strings.EMPTY_ARRAY)), + new AliasFilter(null, Strings.EMPTY_ARRAY), + 1.0f), null); // the search context should inherit the query timeout assertThat(context.timeout(), equalTo(TimeValue.timeValueSeconds(seconds))); |