Reclaim deleted documents memory in Elasticsearch


We have a situation that we are getting some error documents(grokparsefailure) in elasticsearch from logstash. I have deleted all those documents which are around 2million out of 90days data. This is going to be regular process with only few thousands of docs. Now I am wondering, its already more than few days but I still can not see memory is reclaimed. I have added "" : "100mb" to cluster but no use. I have already tried forcemerge on 1month data and didn't try that on another 2months data. I understand that segments should merge so that deleted documents memory will be reclaimed. But When it will happen. Could you please anybody help me in this as we want to see reclaimed memory as early as possible. Thanks.

It's not memory that it uses, it's disk. Merges happen automatically but you can call a force merge too.

Applying that setting has nothing to do with what you want though.

Thanks @warkolm for the quick response. My intention is to disk size only. I have tried force merge on one month data. But I would like to know more about that automatic process like configuring any settings. May I know, is there any chance we can expedite that automatic merging. Thanks.

Merges happen automatically but you can call a force merge too.

As per above these are your best options.

Thanks @warkolm for the quick help :slight_smile:

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