What is the best strategy to a continuously running aggregation?

I'm about to implement sorting my data by popularity. I'm creating a separate index to log views of all items. I want to sort the items by Popularity{Today,Week,Month,Year,AllTime}. For this I need a continuously running script that will aggregate the data from the view index to the data index. I'm afraid that a continuously running script will put continuous high load on the server. Are there any good strategies to avoid performance issues and make this process low priority?

Welcome to our community! :smiley:

There's nothing in Elasticsearch that can do that for you unfortunately. It'll accept the request made and process it with the same priority as other requests.