summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
diff options
context:
space:
mode:
authorSimon Willnauer <simonw@apache.org>2017-02-06 17:10:03 +0100
committerGitHub <noreply@github.com>2017-02-06 17:10:03 +0100
commit7513c6e4eb36a7fd25f2a75aeec729e00c224417 (patch)
tree07501363b9627fb86ef615c996db0e20046ecdbb /core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
parent5e7d22357fb18c8be248460789062537efbc2600 (diff)
Remove QUERY_AND_FETCH search type (#22996)
`QUERY_AND_FETCH` has been treated as an internal optimization for 2 major versions. This commit removes the search type and it's implementation details and folds the optimization in the case of a single shard into the search controller such that every search with a single shard (non DFS) will receive this optimization.
Diffstat (limited to 'core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java')
-rw-r--r--core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java21
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 cca9d73b78..27f9b31389 100644
--- a/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
+++ b/core/src/test/java/org/elasticsearch/action/IndicesRequestIT.java
@@ -580,27 +580,6 @@ public class IndicesRequestIT extends ESIntegTestCase {
assertSameIndicesOptionalRequests(searchRequest, SearchTransportService.FREE_CONTEXT_ACTION_NAME);
}
- public void testSearchQueryAndFetch() throws Exception {
- interceptTransportActions(SearchTransportService.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.QUERY_AND_FETCH);
- SearchResponse searchResponse = internalCluster().coordOnlyNodeClient().search(searchRequest).actionGet();
- assertNoFailures(searchResponse);
- assertThat(searchResponse.getHits().totalHits(), greaterThan(0L));
-
- clearInterceptedActions();
- assertSameIndices(searchRequest, SearchTransportService.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);
}