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.
精彩评论