我的电影属于一种类型并且有多个评级。使用 ElasticSearch,我想先对 Genres 进行分面搜索,然后是 Ratings。
我在这里阅读了这个想法:http ://www.elasticsearch.org/guide/reference/api/search/facets/
但我很困惑如何理解这个 Curl 查询的输出:
curl -X POST "http://localhost:9200/movies/_search?pretty=true" -d ' { “查询”:{“查询字符串”:{“查询”:“T*”}}, “方面”:{ “类别”:{“条款”:{“字段”:“类别”}} } } ' { “接受”:35, “超时”:假, “_shards”:{ “总数”:5, “成功”:5, “失败”:0 }, “命中”:{ “总数”:3, “最大分数”:1.0, “命中”:[{ "_index" : "电影", "_type" : "电影", “_id”:“13”, "_score" : 1.0, "_source" : {"category_id":2,"created_at":"2013-05-03T16:40:21Z","description":null,"title":"小塑料人"," updated_at":"2013-05-03T16:40:21Z","user_id":null} }, { "_index" : "电影", "_type" : "电影", “_id”:“32”, "_score" : 1.0, "_source" : {"category_id":14,"created_at":"2013-05-03T16:55:02Z","description":null,"title":"The Extreme Truth"," updated_at":"2013-05-03T16:55:02Z","user_id":null} }, { "_index" : "电影", "_type" : "电影", “_id”:“39”, "_score" : 1.0, "_source" : {"category_id":7,"created_at":"2013-05-03T16:55:02Z","description":null,"title":"一天中的某个时间", "updated_at":"2013-05-03T16:55:02Z","user_id":null} }] }, “方面”:{ “类别”:{ “_type”:“条款”, “失踪”:3, “总计”:0, “其他”:0, “条款”:[] } }
我有一些以“T”开头的电影,但另外我会期待类型/类别“惊悚片”的电影。
因此,我可以从上面的 JSON 中读取什么?