Hi,


We have a requirement to facet on a field with a date value so that the
following buckets are shown:



a)      Last Week

b)      Last Month

c)       Last Year

d)      2012

e)      2011 or earlier



Of course, as 2013 rolls in, then the labels for the last two buckets
should change to “2013” and “2012 or earlier”.  Is there any way to have
Solr return the correct year based on the current date?  For example, I
thought of trying to do something like this for d) above:



…&facet.query={!key=[NOW-1YEAR/YEAR]}date_entered:[NOW-1YEAR/YEAR TO
NOW/YEAR]...


Thanks,
Carlos

Reply via email to