After looking through the documentation, I am still unsure - If an upsert can be performed against elasticsearch with the Jest java client library?
I was able to do so by using the jsonBuilder:
new Update.Builder(XContentFactory.jsonBuilder().startObject().field("doc_as_upsert", true).startObject("doc").field("foo", "bar").string());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With