[
https://issues.apache.org/jira/browse/LUCENE-5258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788945#comment-13788945
]
Robert Muir commented on LUCENE-5258:
-------------------------------------
{quote}
I know that it is all fashionable to dis on the Java cos and sin functions, but
really... this code can never generate an angle greater than pi and yet it uses
code that falls through to standard cos for anything smaller than MAX_INT *
1e9.
{quote}
Hi Ted: I think you are looking at the logic backwards? it only falls thru for
large values.
{quote}
Did you test to see if this actually helps with the speed?
{quote}
Of course: using thousands of queries.
> 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]