0
votes

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

2

2 Answers

0
votes

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.