How to clear docs.deleted from cat-indices page of elasticsearch?

There are a few document IDs that were rejected by elasticsearch and were added on the docs.deleted section of es. I have fixed the issue with those document IDs. My logstash is still reading the data and in es, instead of increasing doc count it is increasing the docs.deleted count. I used Curl to check those doc ID and output says {"found":false}.

I need to read those document IDs. Is there any way where i can clear the docs.deleted section?

Given below is a snapshot of my es cat-index:

yellow open posdata 74WTmacrRKeyBXMHuiUxgw 5 1 2172567 122443 3.6gb 3.6gb

I have also posted this question on stack overflow
Link: [https://stackoverflow.com/q/47152075/7496485]
(https://stackoverflow.com/q/47152075/7496485)

P.S. I am using ELK 5.6x

Delete docs may be ones that have been updated. The only way to clear them is by waiting for an automatic merge or to run a force merge.

FYI we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! :wink:

How to run a force merge?
What is this Automatic merge?

BTW, I never updated these _ids. They went to docs.deleted because there was some issues with the data and es rejected them. But I have fixed the issue but it still goes to docs.deleted.

Noted: Elastic Stack. :slight_smile:

@warkolm

@warkolm I tried force merge. This was my output:
{
"_shards" : {
"total" : 10,
"successful" : 5,
"failed" : 0
}
}

but there has been no change on my docs.deleted row.

yellow open posdata 74WTmacrRKeyBXMHuiUxgw 5 1 2172567 122443 3.5gb 3.5gb

Did you specify max_num_segments when you performed the force merge, e.g. POST /posdata/_forcemerge?max_num_segments=1 ?

1 Like

@Christian_Dahlqvist This worked. Thank you :slight_smile:

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