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 Eric Grobler <im...@googlemail.com> on 2010/08/04 12:42:44 UTC
Date faceting
Hi Solr community,
How do I facet on timestamp for example?
I tried something like this - but I get no result.
facet=true
facet.date=timestamp
f.facet.timestamp.date.start=2010-01-01T00:00:00Z
f.facet.timestamp.date.end=2010-12-31T00:00:00Z
f.facet.timestamp.date.gap=+1HOUR
f.facet.timestamp.date.hardend=true
Thanks
ericz
Re: Date faceting
Posted by Eric Grobler <im...@googlemail.com>.
Thanks Koji,
It works :-)
Have a nice day.
regards
ericz
On Wed, Aug 4, 2010 at 12:08 PM, Koji Sekiguchi <ko...@r.email.ne.jp> wrote:
> (10/08/04 19:42), Eric Grobler wrote:
>
>> Hi Solr community,
>>
>> How do I facet on timestamp for example?
>>
>> I tried something like this - but I get no result.
>>
>> facet=true
>> facet.date=timestamp
>> f.facet.timestamp.date.start=2010-01-01T00:00:00Z
>> f.facet.timestamp.date.end=2010-12-31T00:00:00Z
>> f.facet.timestamp.date.gap=+1HOUR
>> f.facet.timestamp.date.hardend=true
>>
>> Thanks
>> ericz
>>
>>
>>
> Your parameters are not correct. Try:
>
>
> facet=true
> facet.date=timestamp
> facet.date.start=2010-01-01T00:00:00Z
> facet.date.end=2010-12-31T00:00:00Z
> facet.date.gap=+1HOUR
> facet.date.hardend=true
>
> If you want to use per-field override feature, you can set them:
>
> f.timestamp.facet.date.start=2010-01-01T00:00:00Z
> f.timestamp.facet.date.end=2010-12-31T00:00:00Z
> f.timestamp.facet.date.gap=+1HOUR
> f.timestamp.facet.date.hardend=true
>
> Koji
>
> --
> http://www.rondhuit.com/en/
>
>
Re: Date faceting
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(10/08/04 19:42), Eric Grobler wrote:
> Hi Solr community,
>
> How do I facet on timestamp for example?
>
> I tried something like this - but I get no result.
>
> facet=true
> facet.date=timestamp
> f.facet.timestamp.date.start=2010-01-01T00:00:00Z
> f.facet.timestamp.date.end=2010-12-31T00:00:00Z
> f.facet.timestamp.date.gap=+1HOUR
> f.facet.timestamp.date.hardend=true
>
> Thanks
> ericz
>
>
Your parameters are not correct. Try:
facet=true
facet.date=timestamp
facet.date.start=2010-01-01T00:00:00Z
facet.date.end=2010-12-31T00:00:00Z
facet.date.gap=+1HOUR
facet.date.hardend=true
If you want to use per-field override feature, you can set them:
f.timestamp.facet.date.start=2010-01-01T00:00:00Z
f.timestamp.facet.date.end=2010-12-31T00:00:00Z
f.timestamp.facet.date.gap=+1HOUR
f.timestamp.facet.date.hardend=true
Koji
--
http://www.rondhuit.com/en/