lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Solr Range Facets
Date Fri, 13 May 2011 23:58:12 GMT

: I did try what you suggested, but I am not getting the expected results. The
: code is given below,

+5 points for posting the code you tried, but -10 points for not 
explaining how the results you get are differnet from the results you 
expect, and -5 more points for not even giving an example of the results 
you did get.

In the absense of any other info about how this doesn't match your 
expecations, my hunch is it's because you left out hte crucial part of my 

:             query.set("facet.range.start", "2010-01-01T00:00:00Z") ;

You said you wanted the facet results to be based on the users local 
timezone, but you aren't including the "timezone offset" info that i 
mentioned you should add (Unless this example is suppose to show the 
results for a user whose local timezone is UTC)

See below...

: -----Original Message-----
: From: Chris Hostetter
: Date faceting is entirely driven by query params, so if you index your 
: events using the "true" time that they happend at (formatted as a string 
: in UTC) you can then select your date ranges using whatever timezone 
: offset is specified by your user at query time as a UTC offset.

:       facet.range.start = 2011-01-01T00:00:00Z+${useroffset}MINUTES
: = +1DAY
:       etc...


View raw message