lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com>
Subject Re: Need help with facets
Date Tue, 10 Aug 2010 18:42:26 GMT
> 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]


      

Mime
View raw message