elasticsearch系统学习笔记(问题记录1)-关于term查询的一个问题
关于term查询的一个问题
数据准备精确查询
数据准备
POST /movies/_doc/_bulk
{"index":{"_id":1}}
{"title":"岳父大人2","year":1995,"genre":"喜剧"}
{"index":{"_id":2}}
{"title":"大卫","year":1993,"genre":["喜剧","浪漫"]}
精确查询
GET /movies/_doc/_search
{
"query":{
"term": {
"genre.keyword": "喜剧"
}
}
}
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"faile
共有 0 条评论