创建索引
普通创建
请求:
PUT secisland?pretty
{}
返回值:
{
"acknowledged" : true,
"shards_acknowledged" : true,
"index" : "secisland"
}
创建并设置分片数量
请求:
PUT secisland4
{
"settings": {
"index":{
"number_of_shards":1,
"number_of_replicas":0
}
}
}
或者:
PUT secisland6
{
"settings": {
"number_of_shards":1,
"number_of_replicas":0
}
}
返回值:
{
"acknowledged" : true,
"shards_acknowledged" : true,
"index" : "secisland4"
}
或者:
{
"acknowledged" : true,
"shards_acknowledged" : true,
"index" : "secisland6"
}
更新副分片数量:
PUT secisland6/_settings
{
"number_of_replicas":0
}
查看索引列表
GET _cat/indices?pretty&v