> I have a solr index whose documents have the following
> fields:
>
> FirstName
> LastName
> RecruitedDate
>
> I update the index when any of the three fields change for
> that specific person.
>
> I need to get facets based on when someone was recruited.
> The facets are :
>
> Recruited within 1 month
> Recruited within 3 months
> ...
>
> So if 10 people were recruited within the past month then
> the count
> for r"Recruited within 1 month" will be 10.
>
> Is there a way to calculate the facets from RecruitedDate?
It is possible with facet.query; something like:
q=*:*&facet=on&facet.query=RecruitedDate:[NOW-1MONTH TO
NOW]&facet.query=RecruitedDate:[NOW-3MONTHS TO NOW]