我确实需要基于Solr velocity UI中的索引字段来获取唯一的面计数。似乎有一个json选项可以获得唯一的facet计数。这可以在solrconfig.xml中使用吗
这是我尝试过的。(来自requestHandler部分)
<str name="facet">on</str>
<str name="facet.missing">false</str>
<str name="facet.field">State</str>
<str name="facet.query">State:&json.facet={ x : "unique(State)" }</str>这会抛出错误。
有没有其他方法可以获得唯一的值?
谢谢,
发布于 2016-08-30 15:18:01
在solr request URL &json.facet=中添加facet {x:"unique(manu_exact)"}
示例:
http://localhost:8983/solr/collection1/select?indent=on&q=*:*&wt=json&json.facet={x : "unique(manu_exact)"}相应地更改集合名称,您可以在底部看到facets计数。
其中count:是所有方面的计数。x:是小平面的唯一值计数。
https://stackoverflow.com/questions/39216196
复制相似问题