lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Malorny <Klaus.Malo...@knipp.de>
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 TestCartesian.java for
> working examples of the search and as a staring point to trace
> through.
>
> in more depth, if you look at DistanceQueryBuilder.java 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.

Greetings,

Klaus




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


Mime
View raw message