Refresh interval guarantee

The documentation on refreshes says:

By default, Elasticsearch periodically refreshes indices every second, but only on indices that have received one search request or more in the last 30 seconds.

What happens if the index was not queried in the last 30 seconds? When does it get refreshed? If I for example write to an index, don't search it for a long time and then search it, will I get up to date results? When I write I get the results immediately on the first search, so I seem to be misunderstanding something. Is there a guarantee on a maximum time for the availability of newly indexed documents? If this varies from cluster to cluster or index to index, how can I check this in my case?

I am interested what is the case on both elasticsearch 5 and 7

thanks

Yes, the search will itself trigger a refresh in this case.

Elasticsearch 5 is ancient, years past EOL, I don't remember its behaviour.

1 Like

If I remember correctly Elasticsearch 5.x simply follows the refresh interval.

1 Like

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