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 dbashford <db...@hotmail.com> on 2011/12/12 20:37:42 UTC

Facet on same date field multiple times

I've Googled around a bit and seen this referenced a few times, but cannot
seem to get it to work

I have a query that looks like this:

facet=true
&facet.date={!key=foo}date
&f.foo.facet.date.start=2010-12-12T00:00:00Z
&f.foo.facet.date.end=2011-12-12T00:00:00Z
&f.foo.facet.date.gap=%2B1DAY

Eventually the goal is to do different ranges on the same field.  Month by
day.  Day by hour.  Year by week.  Something to that effect.  But I thought
I'd start simple to see if I could get the syntax right and what I have
above doesn't seem to work.

I get:
message Missing required parameter: f.date.facet.date.start (or default:
facet.date.start)
description The request sent by the client was syntactically incorrect
(Missing required parameter: f.date.facet.date.start (or default:
facet.date.start)).

So it doesn't seem interested in me using the local key.  From reading here: 
http://lucene.472066.n3.nabble.com/Date-Faceting-on-Solr-3-1-td3302499.html#a3309517
it would seem i should be able to do it (see the note at the bottom).

I know one option is to copyField the date into a few other spots, and I can
use that as a last resort, but if this works and I'm just arsing something
up...

--
View this message in context: http://lucene.472066.n3.nabble.com/Facet-on-same-date-field-multiple-times-tp3580449p3580449.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Facet on same date field multiple times

Posted by Chris Hostetter <ho...@fucit.org>.
: Eventually the goal is to do different ranges on the same field.  Month by
: day.  Day by hour.  Year by week.  Something to that effect.  But I thought
: I'd start simple to see if I could get the syntax right and what I have
: above doesn't seem to work.
	...
: So it doesn't seem interested in me using the local key.  From reading here: 
: http://lucene.472066.n3.nabble.com/Date-Faceting-on-Solr-3-1-td3302499.html#a3309517
: it would seem i should be able to do it (see the note at the bottom).

That was me, and i was wrong in that post ... what worked was changing the 
output key, but using that key to specify the various date (ie: range) 
based params has never worked, and i didn't realize that at the time.

The work to try and fix this is currently being tracked in tihs Jira 
issue, i recently spelled out what i think would be needed to finish it 
up, but i don't think anyone is actively working on it (if you want to 
jump in, patches would certianly be welcome)...

https://issues.apache.org/jira/browse/SOLR-1351

-Hoss