New Java API client BulkRequest lacks documentation/features

Can somebody show me a more elaborate example of using the new Java API BulkRequest? I used to be able to set things like bulk size, bulk actions, concurrent requests,... I already took a look at elasticsearch-java/RequestTest.java at main · elastic/elasticsearch-java · GitHub but there is nothing there that casts some light on the problem.
One other problem, there seems to be no way to simply get the source (as a string) on the BulkResponseItem, BulkResponseItem.get().source() returns a Map<String, JsonData). A bit cumbersome since we are using GSON and that means an extra conversion step.

If you meant the BulkProcessor, there is no yet a replacement for this helper class AFAIK. It's in the roadmap though.
So for now, you need to do it manually.

I have an example here:

Have a look at:

There is a pending PR to make that easier in the future.

Thanks for the question about the source. I'm basically doing the same at this point using GSON. I thought the source string was available though without going through a conversion step.

Weird decision on to remove the high level rest client from version 8 without a fully fleshed out new api.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.