elasticsearch相关操作
1.创建索引
PUT /test_index
---这种方始会初始化一个主分片一个副本,不可修改
2.创建索引和分片及副本
PUT /test_index3
{
"settings": {
"number_of_shards": 3,
"number_of_replicas": 2
}
}
3.添加索引映射
POST /test_index3/_mapping
{
"properties":{
"name":{
"type":"keyword"
原创
2021-06-05 14:46:46 ·
94 阅读 ·
0 评论