Hi Mike
I guess it's possible using a pair of lat/lng ranges - I've never thought to do
this, but I see no reason why it wouldn't work:
# presuming bounds values are in radians
Venue.search :with => {
:latitude => bounds[:southwest][:lat]..bounds[:northeast][:lat],
:longitude => bounds[:northeast][:lng]..bounds[:southwest][:lng]
}
Let us know how it goes!
--
Pat
On 06/05/2013, at 9:24 AM, Mike C. wrote:
> I have a list of Venues indexed with attributes :latitude and :longitude
> (saved in Radians). Is it possible to use Thinking Sphinx to take a Google
> Bounding box and find the Venues with Lat/Long that are within the
> northeast(lat/lng) and southwest(lat/lng) of the bounding box?
>
> Google Bounding box of United States =>
> "geometry"=>{"bounds"=>{"northeast"=>{"lat"=>71.389888,
> "lng"=>-66.94976079999999}, "southwest"=>{"lat"=>18.9110642,
> "lng"=>172.4546966}}
>
> I found a forum post referencing a "setFilterFloatRange" option in sphinx but
> not sure how it could be implemented with TS.
> http://sphinxsearch.com/forum/view.html?id=7922
>
> --
> You received this message because you are subscribed to the Google Groups
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.