开发者

Solr facet count for specific words

开发者 https://www.devze.com 2023-04-03 02:45 出处:网络
I am trying to find the facet count for a particular field in my Solr Implementation. I was wondering if there is a way to get facet counts for only a few specific words in that field?

I am trying to find the facet count for a particular field in my Solr Implementation.

I was wondering if there is a way to get facet counts for only a few specific words in that field?

For example,

field name = product

values can be camera <10> , tv <20> , DVD <20> , CD <30>

Now is it possible to get the facet counts of only tv and DVD?

I tried using facet.prefix, but it开发者_如何学C does not work for multiple values.

--Jay


Solr support faceting by arbitrary queries as described here.

So, in your case you could get facet counts for only tv and DVD by the following query: http://localhost:8983/solr/select?q=*:*&facet=true&facet.query=product:tv&facet.query=product:DVD

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号