I want to send n upsert partial requests to ES, is such a thing possible? So if the document doesn't exist, insert my partial doc. If it already exists, update it with the partial doc.
Using the bulk helpers, I've tried a ton of variations, but they all wipe out existing values in favour of the new ones.
data = [{
"_index": 'my_index',
"_type": 'my_type',
"_id": 12345,
"doc": {"newkey": 'newvalue'}
}]
helpers.bulk(es, data, index='my_index', doc_type='my_type')
or
data = [{
"_index": 'my_index',
"_type": 'my_type',
"_id": 12345,
"_source": {"newkey": 'newvalue'}
}]
helpers.bulk(es, data, index='my_index', doc_type='my_type')
Does not work either.