Browse files

Fixing geo page's filters - should be floats, not integers (thanks Da…

…n Sketcher)
  • Loading branch information...
1 parent 52312ab commit 677e7330457f2f98a32a6751ae27f67eab1167ad @pat pat committed Jan 2, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 ts/en/geosearching.textile
4 ts/en/geosearching.textile
@@ -51,14 +51,16 @@ For the first, you can provide an array of two arguments (latitude and longitude
{% highlight ruby %}
# Searching for places within 10km "pancakes", :geo => [@lat, @lng],
- :with => {"@geodist" => 0..10_000}
+ :with => {"@geodist" => 0.0..10_000.0}
# Searching for places sorted by closest first "pancakes", :geo => [@lat, @lng],
:order => "@geodist ASC, @relevance DESC"
{% endhighlight %}
If you do not provide any reference to @@geodist@, then the lat/lng values will be ignored by Sphinx.
+*Don't forget:* Sphinx expects the latitude and longitude values to be in radians - so you will probably need to convert the values when searching.
h3. Displaying Results
There's two ways to access the calculated distance. You can either enumerate through the collection using @each_with_geodist@:

0 comments on commit 677e733

Please sign in to comment.