https://github.com/ev2900/opensearch_refresh_interval
Example covering how to adjust the refresh interval on an OpenSearch index
https://github.com/ev2900/opensearch_refresh_interval
aws opensearch performance-tuning refresh-interval
Last synced: 9 months ago
JSON representation
Example covering how to adjust the refresh interval on an OpenSearch index
- Host: GitHub
- URL: https://github.com/ev2900/opensearch_refresh_interval
- Owner: ev2900
- Created: 2023-01-06T16:03:50.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-30T01:11:01.000Z (10 months ago)
- Last Synced: 2025-03-30T02:22:27.052Z (10 months ago)
- Topics: aws, opensearch, performance-tuning, refresh-interval
- Homepage:
- Size: 79.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenSearch Refresh Interval

If you prefer to watch a video instead of reading the instructions below, check out the link below
YouTube video - [https://youtu.be/8uyemEfgcY8](https://www.youtube.com/watch?v=8uyemEfgcY8)
Blog post - [https://opensearch.org/blog/optimize-refresh-interval/](https://opensearch.org/blog/optimize-refresh-interval/)
## Overview
OpenSearch has a default refresh interval of 1 second. The duration of the refresh interval determines how long it takes a document sent to OpenSearch to be search-able.
Refreshing an index can be a resource intensive operation, decreasing the frequency of refreshes can reduce the load on an OpenSearch domain at the cost of decreasing how quickly documents become search-able.
In summary - if you do not need updates / new documents to be search-able within 1 second. Increasing the refresh interval can result in lower load on an OpenSearch domain. This can be especially helpful for write intensive work loads.
The information below describes how to use the OpenSearch APIs to adjust the refresh interval for an index
## Change the OpenSearch Refresh Interval for an Index
Running
```
PUT /sample-data/_settings
{
"index" : {
"refresh_interval" : "30s"
}
}
```
Will adjust the refresh interval of the index **sample-data** from the default of 1 second to 30 seconds. Setting the refresh interval to -1 would disable refreshing. If the refresh interval is -1 refreshes will only happen when they are manually refreshed

## Refresh an Index
Running
```
POST sample-data/_refresh
```
Will manually force a refresh on the index **sample-data**