开发者

Solr Facet Query

开发者 https://www.devze.com 2023-03-04 02:52 出处:网络
I have a schema which has field Polaritywhich is of type \"text\"开发者_开发知识库 and has three values 0,1,-1 and CreatedAt which is of type \"date\".

I have a schema which has field Polarity which is of type "text"开发者_开发知识库 and has three values 0,1,-1 and CreatedAt which is of type "date".

How can I get count of each polarity based on dates. For example, it gives the output that on 5/1/2011 there were 10 counts of 0, 10 counts of 1 and 10 counts of -1


Something like that ?

http://192.168.0.10:8080/solr/your_repository/select?q=date:20110105&facet=true&facet.limit=10&facet.field=Polarity


A little late but may help others looking for an answer.

I would suggest check for Solr pivots for this kind of hierarchical faceting.
You can facet on the dates and the polarity as secondary facet to get results within the date.

0

精彩评论

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

关注公众号