java.lang.IllegalArgumentException: Class class co.elastic.clients.elasticsearch.core.bulk.UpdateOperation cannot be read from JSON

This is working for my usecase:

BulkRequest.Builder brb = new BulkRequest.Builder().index(rechnungen10);
Rechnung r6 = new Rechnung();
r6.Rechnungsbetrag = 49.99f;
brb.operations(buop -> buop.update(uo -> uo.id("" + Rechnungsnummer).action(ua -> ua.doc(r6))));

Found at New JAVA API Documentation -> elasticsearch-java/RequestTest.java at main · elastic/elasticsearch-java · GitHub

Elasticsearch Java API Client should be more like this skripting thing =) ... How do you call it?

Painless

Thanks - Enomine