Aggregation based on Groups of Data

Suppose I have a field with values like:

Junior Developer
Senior Developer
Database Developer
Product Manager
Senior Manager
Scrum Manager

And say if I have virtual groups based on this data like
Developer: (Junior Developer,Senior Developer,Database Developer)
Manager: (Product Manager, Senior Manager, Scrum Manager)

Is it possible to do aggregations which end up in buckets based on these virtual groups of Developer and Manager?

You could use a filters aggregation for that. You can use that aggregation to create arbitrary buckets of documents that match a set of queries.

You could create one bucket for all documents that match a query for "Junior Developer,Senior Developer,Database Developer" and another buckets for documents that match "Product Manager, Senior Manager, Scrum Manager".

1 Like

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