【问题标题】:Where to find elasticSearch index settings documentation?在哪里可以找到 elasticSearch 索引设置文档?
【发布时间】:2021-11-06 21:17:36
【问题描述】:

我正在使用 SpringData 连接到 ElasticSearch。 创建索引时,我可以使用 @Settings 注释指定设置。 [1]

此注解接受 json 文件的路径,但我找不到任何有关如何构造此 JSON 文件和/或可用选项的文档。

这里有人有什么建议吗?

  1. https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#elasticsearc.misc.index.settings

【问题讨论】:

  • 仅供参考,它是 Elasticsearch,而不是 ElasticSearch :)

标签: elasticsearch spring-data-elasticsearch


【解决方案1】:

查看 Elasticsearch 文档 (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#create-index-settings)。 @Setting 注释的 JSON 包含作为 settings 属性值发送的内容。参考上面链接的dos,那将是:

{
  "index": {
    "number_of_shards": 3,  
    "number_of_replicas": 2 
  }
}

【讨论】:

    猜你喜欢
    • 2013-09-04
    • 2018-02-20
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-23
    相关资源
    最近更新 更多