lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan F. Keller" <sfkel...@gmail.com>
Subject Re: geographical searches
Date Mon, 02 May 2005 19:11:52 GMT
2005/5/2, Guillermo Payet <gpayet@localharvest.org>:
> > If you're only searching for any term using *, I'm not sure why you're
> > using Lucene?
> 
> Most searches are not as simple, and for those the GeoFilter does
> the trick.  I'm just trying to optimize for the few searches for
> all items within an area.

What I understand is the following:

Your goal is to restrict documents search results to spatial extends
similar to the syntax which restricts documents based on their
(creation/modification) date within a given time period.

For the indexing field descriptions are added to the indexer in order
to tell him, which fields to index and which store. You now want to
add a new type, let's call it coordinates (WGS84) as a new field type
to index. For Lucene API users nothing changes from here on for the
index.

Now, in a search, a bounding box is given as two WGS84 coordinates (=
lat/lon numbers north/west and lat/lon numbers south east) being a
syntax extension.

Based on the location value (if any) of each hit a result set comes
out which is a subset of all hits if there was no spatial filter
(don't now how you handle hits which have no lat/lon location value?).

Is that right?
Now what are only asking for? The most performant strategy?
For java source code look at http://freegis.org

BTW: You wrote:
> GeoQuery geoSearcher = new GeoSearcher("path_to_index_file", quadTree);
> hits = geoQuery.search(rect,filter);

I think you rather mean
> GeoQuery geoSearcher = new GeoSearcher("path_to_index_file", quadTree);
> hits = geoSearcher.search(rect,filter);
?

-- Stefan
http://www.geometa.info

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message