I deleted few documents using Java API using bulk API. The response was a success and when I check the disk space, I did not see any change.
Later I used force merge to optimize the index as shown below
ForceMergeResponse forceMergeResponse = client.admin().indices() .forceMerge(new ForceMergeRequest(indexName).onlyExpungeDeletes(true).maxNumSegments(1).flush(true)).actionGet();
But still elastic did not free the space.
I tried to trigger optimize request as well but no success.
curl -XPOST 'localhost:9200/indexName/_optimize?only_expunge_deletes=true'
Can someone please help me with this?