After 10 millions documents deleted, I just won 500 mo


#1

Hello everyone,

I need to delete some documents with a particular field with "Delete by query". All is ok, 10 millions are deleted, I go from 14 million to over 4 million.

Before the removal, I was at 9,8 giga. After the removal... 9.3. I just won 500mo ?!

Why ? I must do an additional action ?

Thank you so much for your answers.


(David Pilato) #2

That's the way delete documents works.
It creates new files marking documents as deleted.

Then after a period of time everything is compacted and you can get the space back.
Note that you can run forcemerge API to force this. It will use a lot of IOs though.

That's the reason it's often better to reindex 4m docs than deleting 10m!

Reindex API makes that even easier.


#3

Thank your for your answer.

It's workable to reindex with an elasticsearch query ?


(David Pilato) #4

Yes.


(system) #5

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