Maximum aggregation response limit

hi,

Do we have any limit on fetching the aggregations limit, like search hits limit which is default set to 10000 ?

If so, We use scroll for scrolling over the response, Do we have anything similar to this ?

Many Thanks,
~Kedar

You have limits for terms agg (default to 10 terms).
You don’t really have limits for histograms but your heap size.

Aggregation is an ... aggregation of the data. The idea is to “count” or group by. It should not really gives huge result sets IMO.

What do you have in mind?

Thanks David for your comment,

We have a requirement of finding maximum of one of the fields for every id that we insert.

something similar to below sql query:

select id,max(field1) 
from temp_table
group by id;

Here we are using AggregatorBuilderas to achieve this as below:

AggregationBuilders.terms("ids").field("id").
          subAggregation(AggregationBuilders.max("max").field("field1));

Is this right ?

Thanks,
~Kedar

I wonder if field collapsing would not be a better solution then.

Did you read that? https://www.elastic.co/guide/en/elasticsearch/reference/5.4/search-request-collapse.html

It supports pagination so that might be what you want.

See partitioning on the terms agg
https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#_filtering_values_with_partitions

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.