lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Malorny <>
Subject Re: spatial searches
Date Wed, 02 Jun 2010 09:30:11 GMT
On 22/05/10 08:45, Julian Atkinson wrote:
> Hi Klaus,
> I suggest you take a look at the code in for
> working examples of the search and as a staring point to trace
> through.
> in more depth, if you look at you'll see 2
> filters are being setup.
> The first pass filter is created by CartesianPolyFilterBuilder and
> this makes sure you only consider documents near to the area you are
> searching by looking in the right tier and pulling out the relevant
> grid cells.
> The second filter is dependent on which method you are using Lat/Lng
> or Geohash - this is where the more precise filtering is done based on
> the calculated distance.
> The use of the second pass filter is optional and driven by a boolean.
> If you want to custom score then there is an example in the
> TestCartesian.class with CustomScoreQuery
> Hope this helps,
> Julian

Hi Julian,

sorry not to thank earlier -- unfortunately, I had a family tragedy.

I missed that CustomScoreQuery can be used without ValueSourceQuery instances. 
So I will try to use a term query as a subquery to preselect the documents in 
the geographic vicinity and to finally calculate the right distances using an 
own implementation of CustomScoreProvider.



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

View raw message