2005/5/2, Guillermo Payet <[EMAIL PROTECTED]>: > > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]