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년 전1223회 조회
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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠