Is there a limit on number of fields on which we can aggregate?

Is there a limit on number of fields on which we can aggregate? I could not find any specific info on this. I could find details on # of buckets for a given field, but not for the number of fields itself.

Currently I have only 10-15 fields, but can it go above, say, 200? Would that have a huge impact on performance of overall query?

Thanks

I am not sure we have a limit, but realistically there will be one.

What that is will be based on your cluster setup, your query, mappings, data volume etc etc. You would need to test to figure it out.

So I would ask what your use case is because there is the analyzer that will look at your data and tell you a lot about the data...

If you're in 8.x, you can get a sense of this by going to Discover and checking the field statistics...

Just a thought.

We haven't upgraded to 8.x yet. Our system fetches related data from multiple sources and each source may have few additional fields on which users want to see aggregation. Each time we add a new source, # of aggregation fields goes up by 5 or so. Thats the reason I was checking this. It's only term count/bucket aggregation, we don't have any metrics/calculations on those.

Number of records would be roughly 5million on which the aggregation has to be done.

We will get some dummy data and test it out.

1 Like

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