I’m using the Stats component in solr to do get faceted statistics, which works very well, and now I’m interested in doing the same for my date fields. But it seems it doesn’t work to use facet.date fields with the stats module, is there a way of geting this to work?
My fallback plan is to add my facets as specific fields (date, year-quarter, year-month, etc), but this will require heavy re-indexing.
Your best bet might be to store a copy of all date fields in unix time. This way you can have an integer field and be able to run stats on them.
It seems that stats on date fields is in the works though.
https://issues.apache.org/jira/browse/SOLR-1023