Let's say we have 2 cities "Hamburg" and "Berlin" with a distance of
289 km between them.
Hamburg has 100 hotels and Berlin has 1. Name of the hotel in Berlin
is "Astoria"
model tip.rb:
:match_mode => :extended
my_city = City.search "berlin"
city_lat = (my_city[0].lat / 360.0) * Math::PI * 2
city_long = (my_city[0].lng / 360.0) * Math::PI * 2
Tip.search "berlin", :geo => [city_lat, city_long],
:with => {'@geodist' => Range.new(0.0, 2000000.0)},
:order => "@geodist ASC", :per_page => 50
Everything works and I get only the one hotel "Astoria" in "Berlin" as
result. That's correct but how can I get the other hotels within the
200 km range?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---