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 Wed, 12 Sep 2012 04:54:08 GMT


Chris Male commented on LUCENE-4208:

I don't think there is a clear solution here.  But I feel ValueSource provides maximum flexibility
going forward.  If we continue to support makeValueSource then people can sort, or include
it in their query if they want, or just retrieve the value at some later stage.  makeQuery()
should just return a ConstantScoreQuery.  We can consider in future versions what if anything
we want to do around its score.

WRT to TwoDoubles.  This Strategy was a nice start to this work awhile back and was designed
to replicate existing point-distance functionality.  But it has huge limitations and it constantly
feels like we're being held back by it.  Every Strategy has its limitations, and I dont feel
we should hold back changes just because it impacts TwoDoubles.
> 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