You're on the right track. Solr knows nothing about converting
post codes to lat/lon, you have to do that outside the request
and submit a standard distance query.

Of course this is a bit "interesting". I assume the post codes aren't
perfectly circular (or rectangular for that matter) so you'll get some data
don't expect. Is this OK?

Best
Erick

On Thu, May 3, 2012 at 10:01 AM, Spadez <james_will...@hotmail.com> wrote:
> Hi,
>
> I'm finding it a bit hard to get my head around this. Say I am putting items
> on a map. This is how I am thinking it would work:
>
> A user submits an "item" and specifies the location as "London"
> On submission, I run a process to convert "London" to a Long/Lat which is
> stored in the database
>
> However, when someone then goes onto my site and searches for the postcode
> "SE1 2EL", which is in London, how does Solr know the long / lat of this?
>
> Do I have to query Solr by using Long / Lat, in which case, when a user
> submits a request for "SE1 2EL" I have to convert this to Long / Lat first
> and then send this query to Solr?
>
> I hope I have explained myself well, I would really like to know how others
> have solved this.
>
> James
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Searching-by-location-What-do-I-send-to-Solr-tp3959296.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to