【问题标题】:spring-data-elasticsearch _mget with several indexesspring-data-elasticsearch _mget 有几个索引
【发布时间】:2021-11-10 07:10:17
【问题描述】:

spring-data-elasticsearch 是否可以将Multi get 与多个索引一起使用?

有一个方法 ElasticsearchOperations#multiGet 接受索引列表,因此看起来只使用了第一个。

谢谢

【问题讨论】:

    标签: spring-data-elasticsearch


    【解决方案1】:

    目前这是不可能的。尽管IndexCoordinates 可能包含多个索引名称,但在许多情况下只使用第一个。要使用索引列表,列表的长度需要与要检索的 id 数相同。但目前实现使用IndexCoordinates.getIndexName()为每个项目设置索引。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-12
      • 2018-08-01
      • 2015-09-22
      • 2021-12-24
      • 2021-07-02
      • 1970-01-01
      • 2016-12-13
      相关资源
      最近更新 更多