Force merge in Elasticsearch

0

Hi Everyone,

We use Elasticsearch 7.9 and on monthly bases we create new indexes. Generally the last 4-5 indexes(months) receive large number of updates, so we end up with lots of deleted documents. I read that in order to improve the search performance, we have to do force merge. But from other side its been recommended to do the force merge on indexes that don't receive any write.

Here are my questions.

1- Per (https://aws.amazon.com/premiumsupport/knowledge-center/opensearch-deleted-documents/) merge cause blocking for whole cluster, so how can we periodically do the merging? Wont this cause any prolem for end-user?

2- Since in our case the indexes still receive write, is there any work around to eliminate the deleted documents?

Thanks in advance.

已提問 2 年前檢視次數 1221 次
1 個回答
0

Hi there, please find the answers inline

  1. Yes it is a resource intensive operation and it is recommended to trigger it off business hours or low traffic times. It triggers an asynchronous task that will run in the background until the job is done. You might still be able to perform queries on your cluster while force merge is running if resources are available. But most often all requests are blocked during that time.

  2. As of now there is no work around to eliminate the deleted documents. Segment merges remove this deleted documents automatically when it runs. But to avoid cluster running segment merges when indexes are receiving writes, you should execute force merges periodically when indexes don't receive any write.

Hope this helps!

AWS
支援工程師
已回答 2 年前
AWS
專家
已審閱 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南