Remove deprecated QUERY_AND_FETCH SearchType (#37257)
This SearchType was deprecated since at least 6.0 and according to the documentation is only kept around for pre-5.3 requests. Removing and leaving a comment as placeholder so we don't reuse the byte value associated with it without further consideration.
This commit is contained in:
parent
3d66764660
commit
cd608848e7
|
@ -36,14 +36,9 @@ public enum SearchType {
|
|||
* document content. The return number of hits is exactly as specified in size, since they are the only ones that
|
||||
* are fetched. This is very handy when the index has a lot of shards (not replicas, shard id groups).
|
||||
*/
|
||||
QUERY_THEN_FETCH((byte) 1),
|
||||
QUERY_THEN_FETCH((byte) 1);
|
||||
// 2 used to be DFS_QUERY_AND_FETCH
|
||||
|
||||
/**
|
||||
* Only used for pre 5.3 request where this type is still needed
|
||||
*/
|
||||
@Deprecated
|
||||
QUERY_AND_FETCH((byte) 3);
|
||||
// 3 used to be QUERY_AND_FETCH
|
||||
|
||||
/**
|
||||
* The default search type ({@link #QUERY_THEN_FETCH}.
|
||||
|
@ -99,5 +94,5 @@ public enum SearchType {
|
|||
throw new IllegalArgumentException("No search type for [" + searchType + "]");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.elasticsearch.common.settings.Setting.Property;
|
|||
import org.elasticsearch.index.Index;
|
||||
import org.elasticsearch.index.query.Rewriteable;
|
||||
import org.elasticsearch.index.shard.ShardId;
|
||||
import org.elasticsearch.search.SearchPhaseResult;
|
||||
import org.elasticsearch.search.SearchService;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.search.internal.AliasFilter;
|
||||
|
@ -413,14 +414,13 @@ public class TransportSearchAction extends HandledTransportAction<SearchRequest,
|
|||
};
|
||||
}, clusters);
|
||||
} else {
|
||||
AbstractSearchAsyncAction searchAsyncAction;
|
||||
AbstractSearchAsyncAction<? extends SearchPhaseResult> searchAsyncAction;
|
||||
switch (searchRequest.searchType()) {
|
||||
case DFS_QUERY_THEN_FETCH:
|
||||
searchAsyncAction = new SearchDfsQueryThenFetchAsyncAction(logger, searchTransportService, connectionLookup,
|
||||
aliasFilter, concreteIndexBoosts, indexRoutings, searchPhaseController, executor, searchRequest, listener,
|
||||
shardIterators, timeProvider, clusterStateVersion, task, clusters);
|
||||
break;
|
||||
case QUERY_AND_FETCH:
|
||||
case QUERY_THEN_FETCH:
|
||||
searchAsyncAction = new SearchQueryThenFetchAsyncAction(logger, searchTransportService, connectionLookup,
|
||||
aliasFilter, concreteIndexBoosts, indexRoutings, searchPhaseController, executor, searchRequest, listener,
|
||||
|
|
Loading…
Reference in New Issue