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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to