elasticsearch _settings

查看所有索引的配置信息
GET /_settings


查看某个索引的配置信息

GET /index_name/_settings
{
    "my_index": {
        "settings": {
            "index": {
                "mapping": {
                    "nested_fields": {
                        "limit": "3"
                    }
                },
                "number_of_shards": "5",
                "provided_name": "my_index",
                "creation_date": "1501401908363",
                "number_of_replicas": "1",
                "uuid": "aBaORhvoQb6emZkfKXqSPA",
                "version": {
                    "created": "5010199"
                }
            }
        }
    }
}

创建索引时设置

PUT /my_temp_index
{
    "settings": {
        "number_of_shards" :       ,
        "number_of_replicas" : 0
    }
}

设置索引的副本信息(分片个数不允许修改)

PUT /my_temp_index/_settings
{
   "number_of_replicas" : 0
}

index.mapping.total_fields.limit:索引中的最大字段数。默认值为1000。
index.mapping.nested_fields.limit:索引中嵌套字段的最大数量默认为50。

猜你喜欢

转载自www.cnblogs.com/gavinYang/p/11200198.html
今日推荐