lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "no spam" <mrs.nos...@gmail.com>
Subject Re: all records within distance -- small index
Date Wed, 28 Feb 2007 04:09:04 GMT
I just dug my book out.  Chapter six shows a custom sort that implements a
SortComparatorSource combined with a TermQuery.  I like the way that works
but I guess what I really need to do is a RangeQuery as well.

I have another large index that has 1.2 million docs.  I use a query along
with a hit collector for that.  I then get the lat/lon for each doc and calc
the distance there.  I use some radian math to prevent the expensive great
circle distance first.  I guess this is more expensive than your range query
above?  I've indexed my docs with lat/lon encoded in a single field comma
separated.  I still get < 1 second search times but I know there has to be a
better way.

Don't you have to multiply your lat/lon by 1000 to preserve decimal accuracy
and then calc your offset?  Maybe it's late and I'm not thinking about this
right :)

Mark

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message