[ 
https://issues.apache.org/jira/browse/LUCENE-5258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13789382#comment-13789382
 ] 

Ted Dunning commented on LUCENE-5258:
-------------------------------------

{quote}
I absolutely agree. I do think its handy to get the real distance back in the 
TopFieldDocs from this function, and I think honestly this function is often 
way-overkill especially if you combine with many other scoring factors?
{quote}

Well, since sin(epsilon) = epsilon, losing the asin doesn't actually hurt the 
accuracy much at the scale of hundreds of kilometers.  At the scale of 
thousands of km, what you get is the distance straight through the earth.  That 
is OK in lots of cases, especially where you are sorting results by distance.

Combining distance with other scores doesn't ever make much sense unless you 
are using distance as a boolean cutoff.  In that case, it makes sense to add a 
cutoff argument to the distance function and apply the sin to the cutoff 
instead of applying asin to every distance.


> add distance function to expressions/
> -------------------------------------
>
>                 Key: LUCENE-5258
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5258
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/other
>            Reporter: Robert Muir
>             Fix For: 5.0, 4.6
>
>         Attachments: LUCENE-5258.patch
>
>
> Adding this static function makes it really easy to incorporate distance with 
> the score or other signals in arbitrary ways, e.g. score / (1 + 
> log(distance)) or whatever.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to