I have a situation where I have code that does 3000 bulk inserts of data. This works just fine.
What I now need to do is 3000 bulk inserts OR updates. Specifically, if the key already exists, I need to UPDATE fields A, B and C. If the key does NOT exists, I need to INSERT all fields. But again, if I'm doing the UPDATE, it's just modifying the values of three fields and I want to leave the others alone. I can easily see how I'd do this in two API calls if I were doing each item at a time. A HEAD on the key to see if it exists, and then either the INSERT or UPDATE depending on the result. But is there a way to do this in the bulk API for efficiency? Doing it one at a time will be orders of magnitude slower. -- You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e86adebf-cfef-4c91-97df-9613cb386ab1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
