You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Raju444us <ng...@cormineid.com> on 2009/04/22 23:06:08 UTC

Get date facet counts per month

In the example on the wiki at gives the facet counts for date per day.How
should the query look like to get date facets by month.


http://wiki.apache.org/solr/SimpleFacetParameters#head-068dc96b0dac1cfc7264fe85528d7df5bf391acd


Here is the sample query for day level facet counts.

http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY 


thanks,
Raju
-- 
View this message in context: http://www.nabble.com/Get-date-facet-counts-per-month-tp23175859p23175859.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Get date facet counts per month

Posted by Raju444us <gu...@gmail.com>.
Thanks, Shalin.That worked.

Shalin Shekhar Mangar wrote:
> 
> On Thu, Apr 23, 2009 at 2:36 AM, Raju444us <ng...@cormineid.com>
> wrote:
> 
>>
>> In the example on the wiki at gives the facet counts for date per day.How
>> should the query look like to get date facets by month.
>>
>>
>>
>> http://wiki.apache.org/solr/SimpleFacetParameters#head-068dc96b0dac1cfc7264fe85528d7df5bf391acd
>>
>>
>> Here is the sample query for day level facet counts.
>>
>>
>> http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
>>
> 
> You can use facet.date.gap=+1MONTH
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.
> 
> 

-- 
View this message in context: http://www.nabble.com/Get-date-facet-counts-per-month-tp23175859p23217893.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Get date facet counts per month

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Thu, Apr 23, 2009 at 2:36 AM, Raju444us <ng...@cormineid.com> wrote:

>
> In the example on the wiki at gives the facet counts for date per day.How
> should the query look like to get date facets by month.
>
>
>
> http://wiki.apache.org/solr/SimpleFacetParameters#head-068dc96b0dac1cfc7264fe85528d7df5bf391acd
>
>
> Here is the sample query for day level facet counts.
>
>
> http://localhost:8983/solr/select/?q=*:*&rows=0&facet=true&facet.date=timestamp&facet.date.start=NOW/DAY-5DAYS&facet.date.end=NOW/DAY%2B1DAY&facet.date.gap=%2B1DAY
>

You can use facet.date.gap=+1MONTH

-- 
Regards,
Shalin Shekhar Mangar.