- 禁用字段类型猜测
创建索引blog, 插入文档后新增document, 增加字段end
PUT /blog
{
"mappings":{
"article":{
"dynamic":"false",
"properties": {
"id":{
"type": "text"},
"content":{
"type": "text"},
"author":{
"type": "text"}
}
}
}
}
PUT /blog/article/1
{
"id":"1",
"content":"2",
"author":"wlf",
"end":1
}
###查看mapping, 没有动态增加end 字段的映射
GET /blog/_mapping/article
- 索引结构映射
公共属性:
- index: true , false 是否为该field 创建索引,体现出来就是该字段是否可被查询
######title index 设置为false
PUT my_index1
{
"mappings": {
"_doc": {
"properties": {
"title": {
"type": "text",
"store": false,
"index": false
},
"date": {
"type": "date",
"store": false
},
"con