# AAF and Location Filter

**URL:** <https://www.ruby-forum.com/t/aaf-and-location-filter/142909>\
**Category:** Ferret\
**Created:** [July 13, 2008, 7:44am UTC](https://www.ruby-forum.com/t/aaf-and-location-filter/142909 "2008-07-13T07:44:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvind\_gautam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@arvind\_gautam](https://www.ruby-forum.com/u/arvind_gautam)\
**Post date:** [July 13, 2008, 7:44am UTC](https://www.ruby-forum.com/t/aaf-and-location-filter/142909/1 "2008-07-13T07:44:22Z")

</div>

I am using Acts as Ferret and trying to filter my search results by  
location  
(doing a location-based search).

I came across a locationfilter on  
[http://blog.tourb.us/archives/ferret-and-location-based-searches](http://blog.tourb.us/archives/ferret-and-location-based-searches) ← this  
blog post.

I don’t really know how to use this from within my model (where I’m  
actually  
searching).

Help Please…?

-Arvind

---

<div class="post-metadata">

**Author:** ![arvind\_gautam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@arvind\_gautam](https://www.ruby-forum.com/u/arvind_gautam)\
**Post date:** [July 13, 2008, 8:08am UTC](https://www.ruby-forum.com/t/aaf-and-location-filter/142909/2 "2008-07-13T08:08:20Z")

</div>

For location based search (ActiveRecord Based), you might want to take  
a look at [http://geokit.rubyforge.org/](http://geokit.rubyforge.org/). It’s so cool it supports more  
than one algorithm to calculate proximity.

I haven’t tried to mix ActsAsFerret with Geokit. Would be interesting  
to know what happens.

---

<div class="post-metadata">

**Author:** ![arvind\_gautam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aeb1de/32.png) [@arvind\_gautam](https://www.ruby-forum.com/u/arvind_gautam)\
**Post date:** [July 13, 2008, 8:24am UTC](https://www.ruby-forum.com/t/aaf-and-location-filter/142909/3 "2008-07-13T08:24:42Z")

</div>

Julio,

I’ve actually checked that plugin and it seems to be great.  
But what I’m trying to achieve is pretty much explained on that blog  
post →   
[http://blog.tourb.us/archives/ferret-and-location-based-searches](http://blog.tourb.us/archives/ferret-and-location-based-searches) .  
A-la Google Maps.  
I want to be able to search for a particular named location  
(name/description - text search) within an X mile radius of a given  
lat/long.  
That’s why the filter for ferret 🙂

-Arvind
