You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2016/04/12 11:13:25 UTC

[jira] [Updated] (LUCENE-5325) Move ValueSource and FunctionValues under core/

     [ https://issues.apache.org/jira/browse/LUCENE-5325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alan Woodward updated LUCENE-5325:
----------------------------------
    Attachment: LUCENE-5325.patch

Patch.

To keep it simple, I've just added DoubleValues / DoubleValuesSource, and cut over the expressions module to use it.  Still needs some work:
- the ValueSource.toDoubleValuesSource() method needs a test
- I'm not quite sure how to deal with exceptions throw by Scorer.score() in DoubleValuesSource.SCORES
- I've copied the exists() method from FunctionValues to DoubleValues, but I'm not convinced we need it.  The expressions module doesn't actually use it, at any rate, but in some cases I can see it's useful to distinguish between a zero-value and a non-existent value.  Maybe I should remove it here, and it can be added in later if it's needed for a specific function?
- DoubleValues is an abstract class rather than an interface, simply because I couldn't get the ASM stuff in JavascriptCompiler to work with interfaces.

> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org