# Finding the DELTED document ?!

**URL:** <https://discuss.elastic.co/t/finding-the-delted-document/19487>\
**Category:** Elasticsearch\
**Created:** [August 27, 2014, 8:54am UTC](https://discuss.elastic.co/t/finding-the-delted-document/19487 "2014-08-27T08:54:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ivan\_Ji](https://avatars.discourse-cdn.com/v4/letter/i/d78d45/32.png) [@Ivan\_Ji](https://discuss.elastic.co/u/Ivan_Ji)\
**Post date:** [August 27, 2014, 8:54am UTC](https://discuss.elastic.co/t/finding-the-delted-document/19487/1 "2014-08-27T08:54:31Z")

</div>

Hi all,

I am facing a problem: I can find the deleted document right after I  
deleted it.

But when I wait for seconds, the deleted document is just gone and I cannot  
find the document by using the same command.

In face, I knew there is something similar when post a new document, you  
need to wait a while to be able to find it. I think it's acceptable for me.  
But about this case, anyone has ideas?

Here is the reproducible gist:

> <https://gist.github.com/hxuanji/89813ffe0979f12dba66>

  
In the gist, after I deleted the document, I try to XHEAD the document, I  
received 404 which means it had been deleted. So far so good.

But next I try to query it, I actually can find the deleted document. Here  
is the problem. And then I sleep 2 sec, query the same search command  
again, the deleted document is just gone.

Any suggestions of this situation ?

Best,

Ivan

--  
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/4bba2c97-57be-4fe3-811e-33db04372d75%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4bba2c97-57be-4fe3-811e-33db04372d75%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [August 27, 2014, 8:11pm UTC](https://discuss.elastic.co/t/finding-the-delted-document/19487/2 "2014-08-27T20:11:30Z")

</div>

Hi Ivan,

Your observations are due to the fact that the GET API is a realtime API  
while the search API is only near-realtime. This means that new documents,  
document updates and document deletions can take some time (around 1 second  
by default) before they are visible.

On Wed, Aug 27, 2014 at 10:54 AM, Ivan Ji [hxuanji@gmail.com](mailto:hxuanji@gmail.com) wrote:

> Hi all,
> 
> I am facing a problem: I can find the deleted document right after I  
> deleted it.
> 
> But when I wait for seconds, the deleted document is just gone and I  
> cannot find the document by using the same command.
> 
> In face, I knew there is something similar when post a new document, you  
> need to wait a while to be able to find it. I think it's acceptable for me.  
> But about this case, anyone has ideas?
> 
> Here is the reproducible gist:  
> [Finding the deleted document · GitHub](https://gist.github.com/hxuanji/89813ffe0979f12dba66)  
> In the gist, after I deleted the document, I try to XHEAD the document, I  
> received 404 which means it had been deleted. So far so good.
> 
> But next I try to query it, I actually can find the deleted document. Here  
> is the problem. And then I sleep 2 sec, query the same search command  
> again, the deleted document is just gone.
> 
> Any suggestions of this situation ?
> 
> Best,
> 
> Ivan
> 
> --  
> 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/4bba2c97-57be-4fe3-811e-33db04372d75%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4bba2c97-57be-4fe3-811e-33db04372d75%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
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/CAL6Z4j72eUy3Tv0vxidn7yDU98pK8AFfLzrvik%3DQeSbuhf0-dg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j72eUy3Tv0vxidn7yDU98pK8AFfLzrvik%3DQeSbuhf0-dg%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:05am UTC](https://discuss.elastic.co/t/finding-the-delted-document/19487/3 "2017-07-06T01:05:56Z")

</div>


