An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# OpenSearch Refresh Interval

map-user map-user

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

cat_indicies_1

## Refresh an Index

Running

```
POST sample-data/_refresh
```

Will manually force a refresh on the index **sample-data**

cat_indicies_1