Index Refresh timing and wait_for usages

Using 2.11.0 OpenSearch and Dashboard

Wanted to get some more info on index refresh and how does the timing of refreshes work.

From my understanding if there are searches that are happening on an index the an index will be refreshed every 1 sec.

However, lets say there’s no searches happening and a new document is inserted/updated. Does this trigger a refresh?

If a document is inserted/updated and the API call has refresh=wait_for and the index has not received any search request in 30+ second how long will the index request wait for the refresh to be done? Will it be done at all?

@gsitu322 Is this answer your question?

index.refresh_interval (Time unit): How often the index should refresh, which publishes its most recent changes and makes them available for searching. Can be set to -1 to disable refreshing. Default is 1s.