I'm in the position where I need to make sure a document is deleted from
the index when something occurs in my source system. I want to just hit it
with a DELETE every time. Is that a good idea?
It looks to me like DELETEing documents via ID is pretty cheap if the
document doesn't exist. It looks like it sets some dirty flags but is
otherwise pretty quick. My alternative is to do a GET and DELETE if it
exists or, maybe, do something cute like:
curl -XPOST 'localhost:9200/index/type/id/_update' -d '{
"script" : "ctx.op = "delete""
}'
which will short circuit that.
I'm pretty sure you're right
On Jun 6, 2014 8:03 PM, "Nikolas Everett" nik9000@gmail.com wrote:
I'm in the position where I need to make sure a document is deleted from
the index when something occurs in my source system. I want to just hit it
with a DELETE every time. Is that a good idea?
It looks to me like DELETEing documents via ID is pretty cheap if the
document doesn't exist. It looks like it sets some dirty flags but is
otherwise pretty quick. My alternative is to do a GET and DELETE if it
exists or, maybe, do something cute like:
curl -XPOST 'localhost:9200/index/type/id/_update' -d '{
"script" : "ctx.op = "delete""
}'
which will short circuit that.
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.