# Undo delete feature

**URL:** <https://discuss.elastic.co/t/undo-delete-feature/18748>\
**Category:** Elasticsearch\
**Created:** [July 19, 2014, 6:21am UTC](https://discuss.elastic.co/t/undo-delete-feature/18748 "2014-07-19T06:21:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [July 19, 2014, 6:21am UTC](https://discuss.elastic.co/t/undo-delete-feature/18748/1 "2014-07-19T06:21:22Z")

</div>

Hi All,

I like to if ElasticSearch has any undo delete operation.

So any document deleted using delete api can be recovered until it is  
deleted from disk using optimize api flag only\_expunge\_deletes.

If it is not there I like to know what are the challenges to develop that  
as we already have document in index and just marked it as delete.

Thanks,  
Pulkit Agrawal  
Product Analyst  
Mckinsey&Company

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![vineeth\_mohan\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vineeth_mohan_2/32/747_2.png) [@vineeth\_mohan\_2](https://discuss.elastic.co/u/vineeth_mohan_2)\
**Post date:** [July 19, 2014, 8:56am UTC](https://discuss.elastic.co/t/undo-delete-feature/18748/2 "2014-07-19T08:56:21Z")

</div>

Hello Pulkit ,

The best option i can suggest would be to take snapshot of the index before  
the delete opertaion.  
And later retrieve the document that you need.

Else you might need to look at lucene level.  
I believe lucene has features to tag a version and restoring to it later.

Thanks  
Vineeth

On Sat, Jul 19, 2014 at 11:51 AM, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com)  
wrote:

> Hi All,
> 
> I like to if Elasticsearch has any undo delete operation.
> 
> So any document deleted using delete api can be recovered until it is  
> deleted from disk using optimize api flag only\_expunge\_deletes.
> 
> If it is not there I like to know what are the challenges to develop that  
> as we already have document in index and just marked it as delete.
> 
> Thanks,  
> Pulkit Agrawal  
> Product Analyst  
> Mckinsey&Company
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nPyRYrPOZjO4kvWT1AAT%2BOvjDs%2BuPoeZhSh8C%3D9LV9pw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nPyRYrPOZjO4kvWT1AAT%2BOvjDs%2BuPoeZhSh8C%3D9LV9pw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Kartavya](https://avatars.discourse-cdn.com/v4/letter/k/65b543/32.png) [@Kartavya](https://discuss.elastic.co/u/Kartavya)\
**Post date:** [July 19, 2014, 11:53am UTC](https://discuss.elastic.co/t/undo-delete-feature/18748/3 "2014-07-19T11:53:55Z")

</div>

Thanks Vineeth.

I think it must be a feature of Elasticsearch.

~Pulkit

On Sat, Jul 19, 2014 at 2:26 PM, vineeth mohan [vm.vineethmohan@gmail.com](mailto:vm.vineethmohan@gmail.com)  
wrote:

> Hello Pulkit ,
> 
> The best option i can suggest would be to take snapshot of the index  
> before the delete opertaion.  
> And later retrieve the document that you need.
> 
> Else you might need to look at lucene level.  
> I believe lucene has features to tag a version and restoring to it later.
> 
> Thanks  
> Vineeth
> 
> On Sat, Jul 19, 2014 at 11:51 AM, Pulkit Agrawal [pulkitdotcom@gmail.com](mailto:pulkitdotcom@gmail.com)  
> wrote:
> 
> > Hi All,
> > 
> > I like to if Elasticsearch has any undo delete operation.
> > 
> > So any document deleted using delete api can be recovered until it is  
> > deleted from disk using optimize api flag only\_expunge\_deletes.
> > 
> > If it is not there I like to know what are the challenges to develop that  
> > as we already have document in index and just marked it as delete.
> > 
> > Thanks,  
> > Pulkit Agrawal  
> > Product Analyst  
> > Mckinsey&Company
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAMVa6up86Rphmh7C7fNVBANgXMvi8ruV7GD78iVHhzw1tuWQCw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nPyRYrPOZjO4kvWT1AAT%2BOvjDs%2BuPoeZhSh8C%3D9LV9pw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nPyRYrPOZjO4kvWT1AAT%2BOvjDs%2BuPoeZhSh8C%3D9LV9pw%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nPyRYrPOZjO4kvWT1AAT%2BOvjDs%2BuPoeZhSh8C%3D9LV9pw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nPyRYrPOZjO4kvWT1AAT%2BOvjDs%2BuPoeZhSh8C%3D9LV9pw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAMVa6uo9aEbsz338hSJkWy5S4c5S2DkUXVeJDwpHDJuONBy3Yg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAMVa6uo9aEbsz338hSJkWy5S4c5S2DkUXVeJDwpHDJuONBy3Yg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:14am UTC](https://discuss.elastic.co/t/undo-delete-feature/18748/4 "2017-07-06T01:14:44Z")

</div>


