33-B01
33-B01

Reputation: 2066

Is it possible to undelete a document in Elasticsearch?

From reading this article (Lucene's Handling of Deleted Documents), I understand that deleted documents in Elasticsearch are simply marked as deleted, such that they may remain on the disk for some time afterwards.

I was therefore wondering if there was a way to recover deleted documents in Elasticsearch?

Upvotes: 3

Views: 3811

Answers (1)

Waldemar Neto
Waldemar Neto

Reputation: 876

Deleted documents and old document versions are totally removed by the segment merging process :(

This is the moment when those old deleted documents are purged from the filesystem. Deleted documents (or old versions of updated documents) are not copied over to the new bigger segment.

https://www.elastic.co/guide/en/elasticsearch/guide/current/merge-process.html

Upvotes: 4

Related Questions