0
votes

I am using Ruby on Rails and the Thinking-Sphinx Gem with Sphinx as the search program. I would like to have a bing map where users can draw sales boundries (just a square) and have Sphinx return all customers within the drawn squares. Is this possible? I always see Sphinx do radius queries, but nothing inside of a 4 or 5 point box.

I mentioned Rails and THinking-Sphinx just to let you guys know what I was using, although this is more of a Sphinx question than anything.

Any help is greatly appreciated!

2

2 Answers

0
votes

Sorry, pretty certain Sphinx doesn't support searching within boxes, just radius queries.

2
votes

Your latitude and longitude values are available as filterable fields/attributes (if you configure sphinx in correct way).

You can set up a "FilterFloatRange" to limit your results to be within the required bounds. Please note that lat/lon values need to be stored as radiant values.