[TEST] fix SearchScrollTests, scroll doesn't support searchType count

This commit is contained in:
javanna 2015-03-31 14:05:33 +02:00 committed by Luca Cavanna
parent 83fb0a10e5
commit ff6b605778
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ public abstract class TransportSearchHelper {
} else if (searchType == SearchType.SCAN) {
return buildScrollId(ParsedScrollId.SCAN, searchPhaseResults, attributes);
} else {
throw new ElasticsearchIllegalStateException();
throw new ElasticsearchIllegalStateException("search_type [" + searchType + "] not supported");
}
}

View File

@ -427,7 +427,7 @@ public class SearchScrollTests extends ElasticsearchIntegrationTest {
.setQuery(QueryBuilders.matchAllQuery())
.setSize(Integer.MAX_VALUE);
if (searchType == SearchType.SCAN || randomBoolean()) {
if (searchType == SearchType.SCAN || searchType != SearchType.COUNT && randomBoolean()) {
builder.setScroll("1m");
}