'Spring Data Elasticsearch 4 bulk insert different queries to different indices

In version 3.x one cloud specify the index name as part of the query, in version 4 it is written "Removal of implicit index name from query objects" (so no withIndexName)...

How can I bulk insert different queries to different indices in the same bulk other than using the RestHighLevelClient directly?



Solution 1:[1]

That's clearly a regression from version 3 (nobody found that in the last 1.5 years). I created an issue to address this.

Edit 06.02.2022:

This has been implemented and will be available from Spring Data Elasticsearch milestone release 4.4.M3 on.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1