目前我正在尝试
json.facet={
"category" : { "type": "terms", "field": "category" },
"initial_category" : { "type": "terms", "field": "category", domain: { excludeTags: "*"} }
}
但没有成功。
我需要initial_category
在没有所有过滤器的情况下检索bucket。
完整的查询是
curl http://localhost:8983/solr/items/query -d '
q=name:phone&
fq={!tag=size}size:2XL&
rows=0&
json.facet={
"category" : { "type": "terms", "field": "category"},
"initial_category" : { "type": "terms", "field": "category", domain: { excludeTags: ""} }
}'
如何从facet中排除所有标签?
试试看:
json.facet={
"category": {
"type": "terms",
"field": "category"
},
"initial_category": {
"type": "terms",
"field": "category",
domain: {
query: "*:*"
}
}
}
facet.domain.query允许在任意查询上运行facet,而不考虑主域。
https://lucene.apache.org/solr/guide/8_0/json-faceting-domain-changes.html#arbitrary-域查询