Can I configure logstash to run a refresh in elasticsearch?

I'm (mis)using logstash to load a days worth of data into elasticsearch, and then exit.

Is there a way for logstash to trigger an elasticsearch refresh on the index logstash is writing to after that has happened? Even better if it could wait for the refresh to complete :slight_smile:

Nope.

I don't quite get the use case. ES refreshed the indexes every few seconds anyway so why is it important with an explicit refresh? And why wait for its completion?

I want to run my query once I am sure the data is in the index.

So run a refresh before the query call via your code?

Will a refresh only return once it has completed?