lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Male (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4208) Spatial distance relevancy should use score of 1/distance
Date Sun, 09 Sep 2012 06:09:07 GMT


Chris Male commented on LUCENE-4208:

I actually totally agree with David here.  Using ValueSource (instead of my SpatialSimilarity
idea) is an excellent solution which leverages existing Lucene code.  Having it this way means
that even if a Strategy has a custom Query implementation (maybe for performance reasons)
it would still be possible to make use of the ValueSource in scoring.

I definitely think we should expose this on a per Strategy basis rather than all Strategys
as some Strategys may not be able to compute distance and we shouldn't force them to.
> Spatial distance relevancy should use score of 1/distance
> ---------------------------------------------------------
>                 Key: LUCENE-4208
>                 URL:
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/spatial
>            Reporter: David Smiley
>             Fix For: 4.0
> The SpatialStrategy.makeQuery() at the moment uses the distance as the score (although
some strategies -- TwoDoubles if I recall might not do anything which would be a bug).  The
distance is a poor value to use as the score because the score should be related to relevancy,
and the distance itself is inversely related to that.  A score of 1/distance would be nice.
 Another alternative is earthCircumference/2 - distance, although I like 1/distance better.
 Maybe use a different constant than 1.
> Credit: this is Chris Male's idea.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

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

View raw message