Pat... Thanks for replying. That makes sense why it gives warnings. :)
Reason for non-radians is I'm also using Multi-Geocoder for some stuff, which uses degrees - so there's some conversion work being done between the two. I don't under stand the last sentence though : "TS may also get confused when both latitude/longitude and lat/lng exist, so better to just have a single pair and work with that." Can you elaborate? Manish On Oct 10, 2011, at 12:41 AM, Pat Allan wrote: > I think this is because you're duplicating attribute names - they should be > unique. > > I wouldn't think there's much point in having the non-radians version, but > that's up to you. TS may also get confused when both latitude/longitude and > lat/lng exist, so better to just have a single pair and work with that. > > -- > Pat > > On 09/10/2011, at 11:32 AM, mrmanishs wrote: > >> So, >> >> In my model, when I have: >> >> define_index do >> has latitude, longitude >> has "RADIANS(latitude)", :as => :latitude, :type => :float >> has "RADIANS(longitude)", :as => :longitude, :type => :float >> end >> >> The indexer throws warnings: >> >> WARNING: attribute 'latitude' not found - IGNORING >> WARNING: attribute 'longitude' not found - IGNORING >> >> However, when I do: >> >> define_index do >> has latitude, longitude >> has "RADIANS(latitude)", :as => :lat, :type => :float >> has "RADIANS(longitude)", :as => :lng, :type => :float >> end >> >> No warnings show up. >> >> Also, the second one seems to work correctly with .each_with_geodist, >> but first one does not. Any idea why? >> >> -- >> 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. >> > > -- > 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. -- 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.
