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

Adrien Grand commented on LUCENE-7623:
--------------------------------------

I like this functionality, here are some comments:

- Why did you add a new {{forSearcher}} method, there does not seem to be any 
useful implementation of it?
- I think it can be problematic to call {{doubleValue()}} from {{toString()}} 
since {{doubleValue()}} requires that the values source be positioned while 
{{toString()}} may be called anytime.
 - Why do the new tests depend on the expressions module? I would rather like 
to have custom values sources in the test class than adding this new dependency.
 - Let's use {{DoublePredicate}} rather than {{Predicate<Double>}}?
 - Let's maybe add a TODO around the cost impl of {{FunctionMatchQuery}} about 
whether values sources should be able to give this information.
 - Maybe FunctionScoreWeight should cast to double _after_ the multiplication 
with the boost in order to reduce the accuracy loss?
 - Can we not use the {{@Test}} annotation, like in lucene/core?

> Add FunctionScoreQuery and FunctionMatchQuery
> ---------------------------------------------
>
>                 Key: LUCENE-7623
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7623
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Minor
>         Attachments: LUCENE-7623.patch, LUCENE-7623.patch, LUCENE-7623.patch
>
>
> We should update the various function scoring queries to use the new 
> DoubleValues API



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to