I would like to perform bulk request of next action. I want to create document if it does not exist, but I would like to update it, if it does exist. Within the update, I append new values (new_a and new_b) to arrays which are inside a single doc (a and b). For a single document, next part of code in Python seems to work flawlessly, when I invoke update function with following body:
can you maybe explain in more detail, what exactly fails and how your code looks like? are you calling the bulk endpoint yourself are you using the bulk helper?
so what I do is I loop over my data in a python loop and I yield every map (dictionary) that I need to update. What I send to helpers.bulk() function from a Python Elasticsearch library is next scheme
in which updateSchema is a map from my original post. The scripts executes, but rather then storing results from scripts, it stores them as literal strings. Additionally, I tried the variant with body explained on next link, but again, scripts are not being executed but stored as strings.
EDIT:
Figured it out, op_type has to be sent with a starting "_" to be interpreted properly
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.