SQL: Don't put aggs only queries into scroll context
SQL was adding scroll timeouts to aggregation only queries. At best this is just confusing because we never scroll these queries. It *might* leave behind a scroll context that we don't want. It is failing some new validation that says that we have to have a `size` for every scroll query. Anyway, the simplest thing to do is to not put a scroll on aggregation only queries. Original commit: elastic/x-pack-elasticsearch@f6819a32b8
This commit is contained in:
parent
4680e1e166
commit
021e8dd111
|
@ -86,14 +86,12 @@ public class Scroller {
|
|||
}
|
||||
|
||||
SearchRequest search = client.prepareSearch(index).setSource(sourceBuilder).request();
|
||||
search.scroll(keepAlive).source().timeout(timeout);
|
||||
|
||||
boolean isAggsOnly = query.isAggsOnly();
|
||||
|
||||
ScrollerActionListener l;
|
||||
if (isAggsOnly) {
|
||||
if (query.isAggsOnly()) {
|
||||
l = new AggsScrollActionListener(listener, client, timeout, schema, query);
|
||||
} else {
|
||||
search.scroll(keepAlive).source().timeout(timeout);
|
||||
l = new HandshakeScrollActionListener(listener, client, timeout, schema, query);
|
||||
}
|
||||
client.search(search, l);
|
||||
|
|
Loading…
Reference in New Issue