I need to add a range search for dates.  The usage guide mentions that
dates are converted to timestamps, however it would be nice to have
some examples for how to search them.  This is what I have so far and
it isn't search the way I'd expect.

In the model:
  indexes data.pub_date, :as => :pub_date

Phase 1 (Search for a date field)
When searching, I add the following condition.
  :conditions => {:pub_date => "8/31/2008".to_time.to_i}

This should be an exact match for 4 records.

Phase 2 (Search for a range and my ultimate goal)
I need to take this and search for a range.  According to
http://stackoverflow.com/questions/355937/filtering-sphinx-search-results-by-date-range

I should be able to do a range like:

  :conditions => {:pub_date =>
"8/1/2008".to_time.to_i.."9/10/2008".to_time.to_i}

How can I fix this?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to