Elasticsearch 101: refresh interval
📅 Published: • Thomas Queste
Quick Guide on Elasticsearch refresh_interval setting.
What is the refresh interval?
- Controls how often indexed documents become searchable
- Documents are stored in all cases, just not indexed
- Default is to refresh every second
- Documents are invisible to search until refresh occurs
- Refresh is a background process making new documents visible
Values
- Default: 1 second (
1s) - Set to
-1to disable automatic refreshes - Set to
nullto restore to default settings from the index settings, or the global default of-1 - Custom value (e.g.
30s) for specific workload
Typical usage
- Disable automatic refreshes during heavy indexing by setting it to
-1 - Call the
_refreshmanually API when needed (the end of your operation…)