Search code examples
elasticsearchspring-data-elasticsearch

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

  • 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.