Refresh On Bulk Update is Good or bad

Hello Sir,
We are finding a issue for search after bulk update as the data is not getting refresh immediately so search fails to get the latest data so we thought of using bulk update with refresh but since we have to refresh documents of many shards its taking long time. We tried with get api its getting latest document since we cant pass any query we cant use it as well.
Is bulk update with refresh is good or bad. Is there Any other way.

How Refresh work with Bulk and BulkAsync.

Thank you in advance

The reason refreshes by default are done periodically is because they are expensive operations. Forcing a refresh after every bulk request will therefore negatively affect your indexing performance. The added load on the system could potentially also affect search performance. This is a fundamental part of how Elasticsearch works, so I am not aware of any way around making this trade-off between performance and performance immediate availability of data for searching.

can Calling refresh forcefully from code internally will affect the actual refresh of elasticsearch which is called through refresh interval.

lets say my refresh interval is 1s. and I called refresh from code at 900ms and it completes by 1.1 s will it skip the actual refresh of elasticsearch

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.