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.
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.
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.