1、创建索引

创建索引的语法

PUT /my_index
{
    "settings": { ... any settings ... },
    "mappings": {
        "type_one": { ... any mappings ... },
        "type_two": { ... any mappings ... },
        ...
    }
}

示例
ElasticSearch最佳入门实践(六十)创建、修改以及删除索引

2、修改索引

PUT /my_index/_settings
{
    "number_of_replicas": 1
}

ElasticSearch最佳入门实践(六十)创建、修改以及删除索引

3、删除索引

DELETE /my_index
DELETE /index_one,index_two
DELETE /index_*

DELETE /_all
需要修改配置文件
elasticsearch.yml
action.destructive_requires_name: true

相关文章:

  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-24
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
相关资源
相似解决方案