pivot facet查询不显示嵌套结果



我想使用pivot facet查询与solr来获得每个'区域'中特定'类型'的文档计数。我运行以下查询:

http://localhost:8983/solr/alfresco/select?facet.pivot=ns:region,ns:type&facet=true&indent=on&q=TYPE:ns:caseFile&rows=0&start=0&wt=json

我希望在每个"地区"看到特定"类型"的文件数量。但我只得到'region'计数:

....
"_pivot_mappings_": {
"ns:region,ns:type": "text@s__lt@{http://xxx.eu/model/1.0}region,text@s__lt@{http://xxx.eu/model/1.0}type"
},
"facet.pivot": "ns:region,ns:type",
...
"facet_counts": {
"facet_intervals": {},
"facet_pivot": {
"ns:region,ns:type": [
{
"field": "ns:region",
"count": 479,
"value": "{en}hk"
},
{
"field": "ns:region",
"count": 120,
"value": "{en}gk"
},
{
"field": "ns:region",
"count": 5,
"value": "{en}oc"
},
{
"field": "ns:region",
"count": 2,
"value": "{en}dep"
},
]
},
"facet_queries": {},
"facet_fields": {},
"facet_heatmaps": {},
"facet_ranges": {}
},
文档中记录了Pivot facet以产生我期望的结果,但是我无法得到嵌套计数,就像这里所示的那样。

文档模型或索引本身是否有任何限制,阻止获得我期望的结果?还是这个问题错了?有什么我可以检查的吗?

try "group",但必须为单个值

问题是我想要用于faceting的字段根本不是&;facetable&;这并不是说它们在solr文档中不可见,因为字段不存储在索引中。

到目前为止,我学到的是,为了成为可facetable, file不应该被标记化,它需要有docValues="true"在solr文档模式中。有了这些变化,面饰开始按预期工作。由于solr模式是由alfresco自动构建的,因此有一个"facetable"户外属性(字段)的标记。一旦打开,以前索引和标记的字段,现在变成索引,DocValues,省略规范,省略术语频率&的位置。问题解决了。

最新更新