diff options
author | Simon Willnauer <simonw@apache.org> | 2017-01-26 09:14:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-26 09:14:44 +0100 |
commit | 281250dec937a07e5302a3412de3e0452fe13f89 (patch) | |
tree | e9330f534abf2ee9b138956210c2eb3aa0e324e1 /core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java | |
parent | 719e75bb3fc8bdb3a8aaa7d2959b03244d6cbb46 (diff) |
Remove DFS_QUERY_AND_FETCH as a search type (#22787)
This commit removes the search type `dfs_query_and_fetch` without a
replacement. We don't allow to use this type via REST since 2.x
but still keep it around for no particular reason. There we no users
complaining about the availability. This should now be removed from the
codebase. `query_and_fetch` is still used internally to safe a roundtrip
if there is only one shard but it can't be used via the rest interface.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java')
-rw-r--r-- | core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java index 6760ef52eb..791501373e 100644 --- a/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java +++ b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java @@ -598,27 +598,6 @@ public class IndicesRequestIT extends ESIntegTestCase { assertSameIndicesOptionalRequests(searchRequest, SearchTransportService.FREE_CONTEXT_ACTION_NAME); } - public void testSearchDfsQueryAndFetch() throws Exception { - interceptTransportActions(SearchTransportService.QUERY_QUERY_FETCH_ACTION_NAME, - SearchTransportService.FREE_CONTEXT_ACTION_NAME); - - String[] randomIndicesOrAliases = randomIndicesOrAliases(); - for (int i = 0; i < randomIndicesOrAliases.length; i++) { - client().prepareIndex(randomIndicesOrAliases[i], "type", "id-" + i).setSource("field", "value").get(); - } - refresh(); - - SearchRequest searchRequest = new SearchRequest(randomIndicesOrAliases).searchType(SearchType.DFS_QUERY_AND_FETCH); - SearchResponse searchResponse = internalCluster().coordOnlyNodeClient().search(searchRequest).actionGet(); - assertNoFailures(searchResponse); - assertThat(searchResponse.getHits().totalHits(), greaterThan(0L)); - - clearInterceptedActions(); - assertSameIndices(searchRequest, SearchTransportService.QUERY_QUERY_FETCH_ACTION_NAME); - //free context messages are not necessarily sent, but if they are, check their indices - assertSameIndicesOptionalRequests(searchRequest, SearchTransportService.FREE_CONTEXT_ACTION_NAME); - } - private static void assertSameIndices(IndicesRequest originalRequest, String... actions) { assertSameIndices(originalRequest, false, actions); } |