Hmm, this is a bit of an odd one (but I guess I say that about most of the issues raised on this group).
What is the contents of the geo_location variable? I can't see any reason why it would work differently because of MySQL - it has no impact on the search functionality of Sphinx. -- Pat On 27/05/2009, at 8:30 AM, evo wrote: > > I have @geodist working on my local machine where im running mysql > 5.0.67 but when I put my code onto my production evn @geodist fails to > work and I can't do > > @restaurants_found = Restaurant.search(@keyword, :include => :dishes, > :page => params[:page], :per_page => 10, :geo => > geo_location, :order => '@geodist ASC') > > I get back 0 results with the above. As soon as I remove :order I get > back the results on my production box. > When I run the code on my developer box it comes back fine > with :order. > > I also checked the contents of geo_location, the coordinates are in > there. > > Here is the index snippet: > > define_index do > indexes :name > indexes description > indexes dishes.name, :as => :dish_name > indexes dishes.description, :as => :dish_description > indexes dishes.ingredients, :as => :dish_ingredient > > has 'RADIANS(latitude)', :as => :latitude, :type => :float > has 'RADIANS(longitude)', :as => :longitude, :type => :float > end > > And in the restaurant table the columns are latitude and longitude, so > that shouldn't be a problem. > > The only difference I can think of is the MySQL version, does @geodist > have anything to do with the version of MySQL? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
