Elastic Search Indexing

Dear Team,

How to include aggregations at the time of creating indexing in elastic search.

Please help me.

Best Regards,
Vijaya.

Welcome to our community! :smiley:

Do you mean you want to store the aggregations instead of the data?

Yes Warkolm

The data needs to live in Elasticsearch for an aggregation to be run against it.

Look at using the _rollup endpoint and then storing that into another index once you have the data indexed.

Ok thank you so much.

Initially i will create the indexing then i can apply the aggregations (By using of GET method i can get the aggregations like min,max,avg..etc) on that index.
But here my goal is how to include data(indexed data) and aggregations (like min,max..etc ) in index at the time of index creation in PUT method.

Best Regards,
Vijaya

You cannot run an aggregation on an index that has no data in it though, it's not how they work.

Store your data in a short lived index and use a continuous transform to stash the aggregated data into another index that you keep longer term.

1 Like

Do you know that Elasticsearch is fast enough to compute that at search time?
Why is the reason you want to do this at index time?

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