Solution Options
1. Setting Index Search Idle After
Changes the value that specifies how long a shard cannot receive search or requests until it is considered idle for search.- When this value is increased, the time that needs to pass between two queries for refresh operation increases.
- This only postpones this problem to occur slightly longer term.
- It can be considered if it is a frequently queried system.
2. Setting Index Refresh Interval
Changes the value that specifies how often the refresh operation that makes the latest changes in the index visible for search will be performed.- When this value is increased, refresh is ensured to be done automatically at certain intervals.
- This leads to outdated data being able to come in query results for a certain period and more consumption of system resources.
- It is important to set it if querying is not done frequently but the application performing querying needs to be performant.
- Fine-tuning this refresh time varies according to your needs.
Changing Index Setting
Index-based settings cannot be made in the
elasticsearch.yml file.Index-based settings can be changed either by using index template or by using index settings API.API Usage
Setting on All Indexes
Below shows setting this setting on all indexes with API usage:Setting on Specific Index
Below shows setting this setting only on the specified index with API usage:Index Template Usage
Below shows setting this setting only for the relevant index using Index Template:Using Index Template ensures that these settings are automatically applied for newly created indexes.

