#首先我们还是先增加几个文档
PUT /myindex/article/1
{
"post_date": "2020-03-14",
"title": "Java",
"content": "java is the best language",
"author_id": 119
}
PUT /myindex/article/2
{"post_date": "2020-03-14" ,
"title": "html",
"content": "I like html",
"author_id": 120
}
PUT /myindex/article/3
{"post_date": "2020-03-14" ,
"title": "es",
"content": "Es is distributed document store" ,
"author_id": 110
}
#查看es的文档映射mapping的数据结构
GET /myindex/article/_mapping
mapping数据结构如下:
{
"myindex" : {
"mappings" : {
"article" : {
"properties" : {
"author_ id" : {
"type" : "long"
},
"content" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"post_ _date" : {
"type" : "date"
},
"post_ date" : {
"type" : "text",
&#