映射
创建映射
请求协议
POST
请求路径
http://ip:port/${index}/_mapping
请求body体
{
"properties":{
"msgid":{
"type":"keyword",
"index":true
},
"from":{
"type":"keyword",
"index":true
},
"to":{
"type":"keyword",
"index":false
},
"content":{
"type":"text",
"index":true
}
}
}
返回结果
{
"acknowledged": true
}
查询映射
请求协议
GET
请求路径
http://ip:port/${index}/_mapping
请求body体
无
返回结果
{
"chat": {
"mappings": {
"properties": {
"content": {
"type": "text"
},
"from": {
"type": "keyword"
},
"msgid": {
"type": "keyword"
},
"to": {
"type": "keyword",
"index": false
}
}
}
}
}