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

David Smiley commented on LUCENE-5325:
--------------------------------------

bq. I've copied the exists() method from FunctionValues to DoubleValues, but 
I'm not convinced we need it.

I think it is needed.  Consider a ValueSource that wants to pick between the 
value from a wrapped ValueSource, or if when that VS has no value, then return 
the value from another (perhaps a constant default but could be anything).  The 
only way to get this and remove a FunctionValues.exists() method I see is 
having some sort of BooleanValueSource that has implementations to check if a 
DocValue's value exists.  Then you could address the same use-cases, I think.

The patch looked alright but I didn't apply it to get a more thorough 
impression.  I certainly like the simplicity of it.  And I like this 
API/functionality moving to Core from Queries module -- it's very generic & 
foundational.

> Move ValueSource and FunctionValues under core/
> -----------------------------------------------
>
>                 Key: LUCENE-5325
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5325
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/search
>            Reporter: Shai Erera
>         Attachments: LUCENE-5325.patch
>
>
> Spinoff from LUCENE-5298: ValueSource and FunctionValues are abstract APIs 
> which exist under the queries/ module. That causes any module which wants to 
> depend on these APIs (but not necessarily on any of their actual 
> implementations!), to depend on the queries/ module. If we move these APIs 
> under core/, we can eliminate these dependencies and add some mock impls for 
> testing purposes.
> Quoting Robert from LUCENE-5298:
> {quote}
> we should eliminate the suggest/ dependencies on expressions and queries, the 
> expressions/ on queries, the grouping/ dependency on queries, the spatial/ 
> dependency on queries, its a mess.
> {quote}
> To add to that list, facet/ should not depend on queries too.



--
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