【问题标题】:.Net Nest Elastic search - how to get index name with document.Net Nest Elastic 搜索 - 如何使用文档获取索引名称
【发布时间】:2018-09-08 13:53:18
【问题描述】:

我正在为 Elasticsearch 使用 Nest .Net 客户端。 我在更新文档时遇到问题,因为我不知道弹性 ID 和索引,因为我正在使用 AllIndices() 查找要更新的文档。为了再次索引文档,似乎我至少需要索引文档的索引名称。 帮助任何人?

【问题讨论】:

    标签: c# .net elasticsearch nest


    【解决方案1】:

    如果您可以通过搜索找到您的文档,那么 _index_id(和 _type,如果与您使用的 Elasticsearch 版本相关)将在 the hits metadata 上提供,因此您可以能够使用此信息更新带有Update API 的文档。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 2020-09-11
      • 1970-01-01
      • 2018-01-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多