



GET product/_search
{
"query": {
"bool": {
"must": [
{
"match": {
"skuTitle": "华为"
}
}
],
"filter": [
{
"term": {
"catalogId": "225"
}
},
{
"terms": {
"brandId": [
"1",
"2",
"8"
]
}
},
{
"nested": {
"path": "attrs",
"query": {
"bool": {
"must": [
{
"term": {
"attrs.attrId": {
"value": "9"
}
}
},
{
"terms": {
"attrs.attrValue": [
"海思",
"以官网信息为准"
]
}
}
]
}
}
}
}
]
}
}
}







本文探讨了如何使用Elasticsearch的高级查询语法来精准定位华为品牌的产品,通过组合使用match、term和nested查询,实现了对特定目录、品牌及产品属性的高效筛选。
1100





