Delete Document from Index

Hi

I ran delete query on index documents. It reduces the document count from
57309066 to 6167240

But it is very strange my index size 128 GB remains the same. Can anybody
explain this unexpected behavior?

How can reduce index size with deleted documents?

Regards,
Pulkit

Lucene doesn't remove deleted documents from the index files right away.
Instead, it marks them as deleted and gets rid of them eventually during
segment merges. You can force this process by running:

curl -XPOST
'http://localhost:9200/your-index/_optimize?only_expunge_deletes=true'

See Elasticsearch Platform — Find real-time answers at scale | Elastic
for more information.

On Monday, July 16, 2012 9:38:55 AM UTC-4, kartavya wrote:

Hi

I ran delete query on index documents. It reduces the document count from
57309066 to 6167240

But it is very strange my index size 128 GB remains the same. Can anybody
explain this unexpected behavior?

How can reduce index size with deleted documents?

Regards,
Pulkit

Thanks.
It helps.

On Mon, Jul 16, 2012 at 11:54 PM, Igor Motov imotov@gmail.com wrote:

Lucene doesn't remove deleted documents from the index files right away.
Instead, it marks them as deleted and gets rid of them eventually during
segment merges. You can force this process by running:

curl -XPOST '
http://localhost:9200/your-index/_optimize?only_expunge_deletes=true'

See
Elasticsearch Platform — Find real-time answers at scale | Elastic more information.

On Monday, July 16, 2012 9:38:55 AM UTC-4, kartavya wrote:

Hi

I ran delete query on index documents. It reduces the document count from
57309066 to 6167240

But it is very strange my index size 128 GB remains the same. Can anybody
explain this unexpected behavior?

How can reduce index size with deleted documents?

Regards,
Pulkit