一、创建测试索引库
PUT /my_search
{
"mappings": {
"article": {
"properties": {
"content": {
"type": "text"
},
"email": {
"type": "keyword"
},
"pub_time": {
"type": "date"
},
"title": {
"type": "text"
},
"type": {
"type": "keyword"
},
"words": {
"type": "long"
}
}
}
}
}
二、创建数据库
(1)
POST /my_search/article/1
{
"title":"hello world!",
"content":"hello 你好,世界!",
"email":"test1@163.com",
"words":10000,
"pub_time":"2019-09-24",