json 查询 java_如何读取分面搜索查询的JSON输出?

我正在播放属于某种类型且具有多个评级的电影 . 使用ElasticSearch,我想先在Genres上进行分面搜索,然后再进行评分 .

但我很困惑如何理解这个Curl查询的输出:

curl -X POST "http://localhost:9200/movies/_search?pretty=true" -d '

{

"query" : { "query_string" : {"query" : "T*"} },

"facets" : {

"categories" : { "terms" : {"field" : "categories"} }

}

}

'

{

"took" : 35,

"timed_out" : false,

"_shards" : {

"total" : 5,

"successful" : 5,

"failed" : 0

},

"hits" : {

"total" : 3,

"max_score" : 1.0,

"hits" : [ {

"_index" : "movies",

"_type" : "movie",

"_id" : "13",

"_score" : 1.0, "_source" : {"category_id":2,"created_at":"2013-05-03T16:40:21Z","description":null,"title":"Tiny Plastic Men","updated_at":"2013-05-03T16:40:21Z","user_id":null}

}, {

"_index" : "movies",

"_type" : "movie",

"_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" : "movies",

"_type" : "movie",

"_id" : "39",

"_score" : 1.0, "_source" : {"category_id":7,"created_at":"2013-05-03T16:55:02Z","description":null,"title":"A Time of Day","updated_at":"2013-05-03T16:55:02Z","user_id":null}

} ]

},

"facets" : {

"categories" : {

"_type" : "terms",

"missing" : 3,

"total" : 0,

"other" : 0,

"terms" : [ ]

}

}

我正在播放一些以'T'开头的电影,但另外我会期待来自流派/类别'惊悚片'的电影 .

因此,我可以从上面的JSON中读到什么?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值