lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan F. Keller" <>
Subject Re: Using Lucene, longitude-latitude, and interacting on "search"
Date Sat, 09 Apr 2005 08:56:37 GMT
On Apr 9, 2005 2:03 AM, Garrett Rooney <> wrote:
> Tim Archambault wrote:
> > I'd like to save longitude and latitude data points in my lucene index for
> > businesses, churches, etc. Is the obvious way to store the longitude values
> > as keywords in the format "00.000". Then on the search phase I can compare
> > the "derived" mathematical location for say a registered users lat/long home
> > address from my registered user database and compare with search results?
> > ...and based on LUCENE IN ACTION example, I can boost search results based
> > on proximity from point "index" to point "search."
> >
> > Thanks for any help. For some context, this is a newspaper web site.
> I think you probably wanted to send this to,
> not c-dev@l.a.o.
> -garrett

If you mean that you store lat/long as additional fields (without need
of indexing) there is nothing special to do in Lucene: just retrieve
it and compare it with your separate users  database.

But if you want to index your coordinates for fast spatial search,
then you'll need a 'two-dimensional' index function/algorithm. If the
users database is a based on a currenct DB, then it will probably have
a "spatial extension".

If you want Lucene to do an efficient index search on lat/lon then
you'll have to implement a spatial index. Look for "space filling
curve" or r-tree in your favourite search engine.

-- Stefan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message