[
https://issues.apache.org/jira/browse/LUCENE-5545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13943106#comment-13943106
]
Robert Muir commented on LUCENE-5545:
-------------------------------------
I think i see, i don't actually like the hardcoded javascript+bindings there.
The way this is currently handled in the package is a little different. Impls
like this class are package private and you get a "factory" method on
Expression.java, which keeps the API surface area very small
(http://lucene.apache.org/core/4_7_0/expressions/org/apache/lucene/expressions/package-summary.html),
but still allows e.g. specialization in the case of certain implementations
(for example, haversin function could override getSortField to do some of those
optimizations Ted mentioned on another issue).
{code}
public ValueSource getValueSource(Bindings bindings);
public SortField getSortField(Bindings bindings, boolean reverse);
{code}
Perhaps we should do the same with this Rescorer?
{code}
public Rescorer getRescorer(Bindings bindings);
{code}
> Add ExpressionRescorer
> ----------------------
>
> Key: LUCENE-5545
> URL: https://issues.apache.org/jira/browse/LUCENE-5545
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 4.8, 5.0
>
> Attachments: LUCENE-5545.patch, LUCENE-5545.patch
>
>
> In LUCENE-5489 we added QueryRescorer, to rescore first-pass hits using
> scores from a (usually) more expensive second-pass query.
> I think we should also add ExpressionRescorer, to compute the second pass
> score using an arbitrary JS expression.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]