1.创建索引
http://192.168.0.108:9200/suoyinguanli211/
参数:
{ "settings":{ "index":{ "number_of_shards":3,分片数 "number_of_replicas":2 副本数 } } }

结果如图

修改索引信息
url:http://192.168.0.108:9200/suoyinguanli211/_settings/
参数:
{
"number_of_replicas":1
}

结果:

定义映射类型:
url:http://192.168.0.108:9200/suoyinguanli211-1/
参数:
{
"settings": {
"index": {
"number_of_shards": 3,
"number_of_replicas": 1
},
"mapping": {
"secilog": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"name2": {
"type": "string",
"index": "analyzed"
}
}
}
}
}
}
结果:

删除索引:
url :delete http://192.168.0.108:9200/suoyinguanli211-1/

获取索引:

原文:https://www.cnblogs.com/anxbb/p/9383354.html