I think it would if I indexed the time information separately. Which was my original thought, but I was hoping to store this in one field instead of 2. So my idea was I'd store the time portion as as a number (an int might suffice from 0 to 24 since I only need this to have that level of granularity) then do range queries over that. I couldn't think of a way to do this using the date field though because it would give me bins broken up by hours in a particular day, something like
2012-01-01-00:00:00 - 2012-01-01-01:00:00 10 2012-01-01-01:00:00 - 2012-01-01-02:00:00 20 2012-01-01-02:00:00 - 2012-01-01-03:00:00 5 But what I really want is just the time portion across all days 00:00:00 - 01:00:00 10 01:00:00 - 02:00:00 20 02:00:00 - 03:00:00 5 I would then use the date field to limit the time range in which the facet was operating. Does that make sense? Is there a more efficient way of doing this? On Wed, Feb 15, 2012 at 9:16 AM, Yonik Seeley <yo...@lucidimagination.com> wrote: > On Wed, Feb 15, 2012 at 8:58 AM, Jamie Johnson <jej2...@gmail.com> wrote: >> I would like to be able to facet based on the time of >> day items are purchased across a date span. I was hoping that I could >> do a query of something like date:[NOW-1WEEK TO NOW] and then specify >> I wanted facet broken into hourly bins. Is this possible? Do I > > Will range faceting do everything you need? > http://wiki.apache.org/solr/SimpleFacetParameters#Facet_by_Range > > -Yonik > lucidimagination.com