Fix BWC for query_and_fetch
This commit is contained in:
parent
b8dede06b5
commit
b6c714ccc8
|
@ -342,6 +342,7 @@ public class TransportSearchAction extends HandledTransportAction<SearchRequest,
|
|||
aliasFilter, concreteIndexBoosts, searchPhaseController, executor, searchRequest, listener, shardIterators,
|
||||
timeProvider, clusterStateVersion, task);
|
||||
break;
|
||||
case QUERY_AND_FETCH:
|
||||
case QUERY_THEN_FETCH:
|
||||
searchAsyncAction = new SearchQueryThenFetchAsyncAction(logger, searchTransportService, connectionLookup,
|
||||
aliasFilter, concreteIndexBoosts, searchPhaseController, executor, searchRequest, listener, shardIterators,
|
||||
|
|
|
@ -96,7 +96,8 @@ public class SearchRequestTests extends AbstractSearchTestCase {
|
|||
mutators.add(() -> mutation.requestCache((randomValueOtherThan(searchRequest.requestCache(), () -> randomBoolean()))));
|
||||
mutators.add(() -> mutation
|
||||
.scroll(randomValueOtherThan(searchRequest.scroll(), () -> new Scroll(new TimeValue(randomNonNegativeLong() % 100000)))));
|
||||
mutators.add(() -> mutation.searchType(randomValueOtherThan(searchRequest.searchType(), () -> randomFrom(SearchType.values()))));
|
||||
mutators.add(() -> mutation.searchType(randomValueOtherThan(searchRequest.searchType(),
|
||||
() -> randomFrom(SearchType.DFS_QUERY_THEN_FETCH, SearchType.QUERY_THEN_FETCH))));
|
||||
mutators.add(() -> mutation.source(randomValueOtherThan(searchRequest.source(), this::createSearchSourceBuilder)));
|
||||
randomFrom(mutators).run();
|
||||
return mutation;
|
||||
|
|
|
@ -104,7 +104,7 @@ public class RandomSearchRequestGenerator {
|
|||
searchRequest.scroll(randomPositiveTimeValue());
|
||||
}
|
||||
if (randomBoolean()) {
|
||||
searchRequest.searchType(randomFrom(SearchType.values()));
|
||||
searchRequest.searchType(randomFrom(SearchType.DFS_QUERY_THEN_FETCH, SearchType.QUERY_THEN_FETCH));
|
||||
}
|
||||
if (randomBoolean()) {
|
||||
searchRequest.source(randomSearchSourceBuilder.get());
|
||||
|
|
Loading…
Reference in New Issue