I wish to do an update_by_query request using my python elasticsearch client. I wish to query with index, type and a field which is NOT id. Based on that field I wish to update some of the other fields but if that query returns no results, a new document should be created with the aforementioned index and type.
I could do a search and then update but I wish to do this with one query only. Also I would like to execute multiple such operations using helpers.bulk(es, result) where es is the elasticsearch clientand result is a list of jsons. Elasticsearch Version is 5.4