Comparisons can only be done with integers. To convert a datetime column to an integer, sphinx will use UNIX_TIMESTAMP, which counts up from 0, starting around 1970. It seems like the solution to this would be to cast the datetime as a string instead of a timestamp. Not sure how that is accomplished.
On Jun 12, 3:15 pm, temen <[email protected]> wrote: > Hi, > > I am using Thinking Sphinx with geokit for location and age based > search, and everything seems to be working until i enter max_age > greater or equal to 40, where it then returns an empty set. > > Thanks. > > min_age = params[:min_age].to_i.years.ago > max_age = params[:max_age].to_i.years.ago > ... > > User.search :geo => [latitude, longitude], > :with => {"@geodist" => (0.0..miles_to_meters)}, > :sort => "@geodist ASC", > :with => { :birthdate => max_age..min_age } --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
