You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Spadez <ja...@hotmail.com> on 2012/04/16 12:55:51 UTC

Location Based Searching – Long Lat?

Hi,

If I want to do a proximity search and they have provided me with a name of
a city, for example, “London”. How do I search this by proximity within
Solr?

I am assuming I first need a process to convert the city name to a long and
lat, so that Solr can understand where London is. Is this something that I
need to build into my PHP application or is there a system for this already
in Solr? 

Secondly, how does it work with the size of the city. If I want to search
for pizza in London, how do I automatically put a radius of say 100 miles on
it, whereas if it is a small town the radius would only be small, say 20
miles.

Thanks for any help you can give,

James

--
View this message in context: http://lucene.472066.n3.nabble.com/Location-Based-Searching-Long-Lat-tp3914086p3914086.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Location Based Searching – Long Lat?

Posted by Jan Høydahl <ja...@cominvent.com>.
Hi,

There is no geocoding API in Solr as per now so you could handle that in your PHP app.
But check out https://issues.apache.org/jira/browse/SOLR-2833 for potential solution. I have a first version of the processor which I can upload to that JIRA if you're interested.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com
Solr Training - www.solrtraining.com

On 16. apr. 2012, at 12:55, Spadez wrote:

> Hi,
> 
> If I want to do a proximity search and they have provided me with a name of
> a city, for example, “London”. How do I search this by proximity within
> Solr?
> 
> I am assuming I first need a process to convert the city name to a long and
> lat, so that Solr can understand where London is. Is this something that I
> need to build into my PHP application or is there a system for this already
> in Solr? 
> 
> Secondly, how does it work with the size of the city. If I want to search
> for pizza in London, how do I automatically put a radius of say 100 miles on
> it, whereas if it is a small town the radius would only be small, say 20
> miles.
> 
> Thanks for any help you can give,
> 
> James
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Location-Based-Searching-Long-Lat-tp3914086p3914086.html
> Sent from the Solr - User mailing list archive at Nabble.com.