【发布时间】:2021-11-10 07:10:17
【问题描述】:
spring-data-elasticsearch 是否可以将Multi get 与多个索引一起使用?
有一个方法 ElasticsearchOperations#multiGet 接受索引列表,因此看起来只使用了第一个。
谢谢
【问题讨论】:
spring-data-elasticsearch 是否可以将Multi get 与多个索引一起使用?
有一个方法 ElasticsearchOperations#multiGet 接受索引列表,因此看起来只使用了第一个。
谢谢
【问题讨论】:
目前这是不可能的。尽管IndexCoordinates 可能包含多个索引名称,但在许多情况下只使用第一个。要使用索引列表,列表的长度需要与要检索的 id 数相同。但目前实现使用IndexCoordinates.getIndexName()为每个项目设置索引。
【讨论】: