#创建索引
PUT person
#查询索引
GET person
#查询映射
GET person/_mapping
#删除索引
DELETE person
#添加映射
PUT person/_mapping
{
"properties":{
"name":{
"type":"keyword"
},
"age":{
"type":"integer"
}
}
}
#创建索引并添加映射
PUT person
{
"mappings": {
"properties":{
"name":{
"type":"keyword"
},
"age":{
"type":"integer"
}
}
}
}
#追加映射字段
PUT person/_mapping
{
"properties":{
"address":{
"type":"text"
}
}
}