查看索引
GET /_cat/indices?v
创建索引
PUT /products
创建索引 进行索引分片配置
PUT /orders
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
}
}
删除索引
DELETE /products
创建索引&映射
PUT /products
{
"settings": {
"number_of_shards": 1,
"number_of_replicas": 0
},
"mappings": {
"properties": {
"id": {
"type": "integer"
},
"title": {
"type": "keyword"
},
"price": {
"type": "double"
},
"created": {
"type": "date"
},
"desc": {
"type": "text",
"analyzer": "ik_max_word"
}
}
}
}
查看映射信息
GET /products/_mapping
评论区