I am using Sunspot to search for events (parties, concerts, ...) in a Ruby on Rails 3 application.
I have managed to set up free text search and facet search on a couple of different category types.
Now, I am stuck with my next task. I want to set up facets related to when the event is occuring.
I want to have facets describing both relative date/time ranges such as "today", "this weekend", "next weekend" and absolute date/time ranges, such as "Easter Holiday 2011", "New Years Day 2012", ... The datetime ranges are sometimes overlapping each other.
I have browsed around in the Sunspot API documentation, the Sunspot wiki, here at Stackoverflow, read and loads of articles and blogs. People are writing it is possible to to achieve but I find no examples or implementation ideas that makes me understand how to do this.
Any suggestions?
Since my problem is not in my code, I don't publish any code. The class Event has a DateTime instance named "start_time". I do understand it's my job to define when the absolute date/time ranges appear in the calender.
Best regards,
./stefan
PS Did I tell I'm a newbie? ;-) DS