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.