패싯 탐색을 사용할 때 패싯 필터를 적용 할 때 다음 결과 집합에 더 이상 패싯이 포함되지 않는다는 점에서 탄성 탐색 DSL에 문제가 있습니다. 그들.elasticsearch facets OR filter
{
"sort": {
"_score": {},
"salesQuantity": {
"order": "asc"
}
},
"query": {
"filtered": {
"query": {
"match": {
"categoryTree": "D01"
}
},
"filter": {
"term": {
"publicwebEnabled": true,
"parentID": 0
},
"or": [
{
"range": {
"Retail_Price": {
"to": "49.99",
"from": "0"
}
}
}
]
}
}
},
"facets": {
"delivery_locations": {
"terms": {
"field": "delivery_locations",
"all_terms": true
}
},
"categories": {
"terms": {
"field": "categoryTree",
"all_terms": true
}
},
"collectable": {
"terms": {
"field": "collectable",
"all_terms": true
}
}
},
"from": 0,
"size": 12}
: 다음과 같이 필터를 적용
{
"sort": {
"_score": {},
"salesQuantity": {
"order": "asc"
}
},
"query": {
"filtered": {
"query": {
"match": {
"categoryTree": "D01"
}
},
"filter": {
"term": {
"publicwebEnabled": true,
"parentID": 0
}
}
}
},
"facets": {
"delivery_locations": {
"terms": {
"field": "delivery_locations",
"all_terms": true
}
},
"categories": {
"terms": {
"field": "categoryTree",
"all_terms": true
}
},
"collectable": {
"terms": {
"field": "collectable",
"all_terms": true
}
}
},
"from": 0,
"size": 12}
는, 결과는 내가 다시 얻을 측면을 포함하지 않는 : 나는 초기 검색을 수행 할 때
, 나는 다시 원하는 결과를 얻을
참고 위 필터는 사용자가 여러 가격대를 선택하여 필터링 할 수 있기 때문에 위의 OR 필터를 추가합니다.
내가 잘못 했나요?
나는
나는 똑같은 것을보고 있습니다. 내 쿼리 블록에 "필터링 된"부분이 포함되어 있으면 결과에 패싯이 돌아 가지 않습니다. – svrist