Look at the range faceting stuff. It lets you
specify a start date, end date and gap. And
you can get results for multiple instances
on the same field.

So you could specify one set of parameters
for date_f where the gap was +1MONTH
and another on date_f was +1YEAR.

See:
https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-RangeFaceting

Best,
Erick

On Sun, Nov 16, 2014 at 12:38 AM, adfel70 <adfe...@gmail.com> wrote:
> Hi,
>
> If my data includes:
> doc1: date_f: 2014-05-01T00:00:00Z
> doc2: date_f: 2014-05-02T00:00:00Z
> doc2: date_f: 2014-06-01T00:00:00Z
> doc2: date_f: 2014-07-01T00:00:00Z
>
> then I can facet on month(date_f) and get
> 05(2)
> 06(1)
> 07(1)
> or facet on year(date_f) and get
> 2014(4)
>
>
> Is it supported?
>
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Is-it-possible-to-facet-on-date-fields-and-aggregate-by-day-month-year-tp4169366.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to