lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Updated] (LUCENE-4208) Spatial distance relevancy should use score of 1/distance
Date Thu, 13 Sep 2012 19:41:08 GMT


David Smiley updated LUCENE-4208:

    Attachment: LUCENE-4208_makeQuery_return_ConstantScoreQuery,_standardize_makeDistanceValueSource_behav.patch

Patch with these changes:
* makeValueSource is makeDistanceValueSource to make abundantly clear. And it takes Point
instead of SpatialArgs.
* Standardized behavior of makeDistanceValueSource across the 3 strategies, including null
value behavior (it's '180' if geo, Double.MAX_VALUE otherwise).
* Tests for makeDistanceValueSource in DistanceStrategyTest
* Added final method SpatialStrategy.makeRecipDistanceValueSource(queryShape) including tested
it.  This addresses the title of this JIRA issue.

I'll put off overhauling TwoDoubles into another JIRA issue.  I've already done some work
for that.
> 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
>         Attachments: LUCENE-4208_makeQuery_return_ConstantScoreQuery_and_remake_TwoDoublesStrategy.patch,
> 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