Finding the DELTED document ?!

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:


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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4bba2c97-57be-4fe3-811e-33db04372d75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 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
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/4bba2c97-57be-4fe3-811e-33db04372d75%40googlegroups.com
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j72eUy3Tv0vxidn7yDU98pK8AFfLzrvik%3DQeSbuhf0-dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.