[
https://issues.apache.org/jira/browse/LUCENE-4208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451462#comment-13451462
]
David Smiley commented on LUCENE-4208:
--------------------------------------
I have some in-progress code I need to finish, then post as a patch.
I think the most important thing is for the strategies to expose the distance
as a ValueSource. This is the case currently with PrefixTreeStrategy and
TwoDoublesStrategy. With this, you can do what you want -- inverse reciprocal
distance or whatever. By default, I'd like a Query's score to be something
like that and this is what this issue is about, but even without it you could
do something like:
{code}
new FilteredQuery(new FunctionQuery(myValueSource),
spatialStrategy.makeFilter(...))
{code}
> Spatial distance relevancy should use score of 1/distance
> ---------------------------------------------------------
>
> Key: LUCENE-4208
> URL: https://issues.apache.org/jira/browse/LUCENE-4208
> 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: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]