Is there any possibility to create document automatically if it does not
exist while calling _update:
curl -XPOST http://localhost:9200/test/type1/1/_update -d '{...}' ?
I do not want to check if the document '1' exists using additional
requests to ES (e.g. curl -XGET http://localhost:9200/test/type1/1) if it
is possible.
There isn't a functionality for this, though you can build it on top of it,
i.e., send an update request, and then send an index (with create flag) to
it if the doc is not found.
Is there any possibility to create document automatically if it does not
exist while calling _update:
curl -XPOST http://localhost:9200/test/type1/1/_update -d '{...}' ?
I do not want to check if the document '1' exists using additional
requests to ES (e.g. curl -XGET http://localhost:9200/test/type1/1) if it
is possible.
W dniu sobota, 21 kwietnia 2012 użytkownik Shay Banon napisał:
There isn't a functionality for this, though you can build it on top of
it, i.e., send an update request, and then send an index (with create flag)
to it if the doc is not found.
On Thu, Apr 19, 2012 at 6:48 PM, Marcin Dojwa <m.dojwa@livechatinc.com<javascript:_e({}, 'cvml', 'm.dojwa@livechatinc.com');>
wrote:
Hi,
Is there any possibility to create document automatically if it does not
exist while calling _update:
curl -XPOST http://localhost:9200/test/type1/1/_update -d '{...}' ?
I do not want to check if the document '1' exists using additional
requests to ES (e.g. curl -XGET http://localhost:9200/test/type1/1) if
it is possible.
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.