想做以下这种搜索,但是用java QueryBuilders 一直报错,这种多个嵌套 怎么试啊?{
"query": {
"multi_match": {
"query" : "亮瓷黑",
"fields" : ["goods_name", "spec_info"]
}
},
"aggs": {
"grades_count": {
"terms": {
"field": "product_id"
}
}
}
}
"query": {
"multi_match": {
"query" : "亮瓷黑",
"fields" : ["goods_name", "spec_info"]
}
},
"aggs": {
"grades_count": {
"terms": {
"field": "product_id"
}
}
}
}
1 个回复
rochy - rochy_he
赞同来自:
下面那个是聚合,需要使用 聚合的 builder,属于 termsAgg