You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/09/19 01:02:34 UTC

[jira] [Updated] (LUCENE-5961) FunctionValues.exist(int) isn't returning false in cases where it should for many "math" based value sources

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

Hoss Man updated LUCENE-5961:
-----------------------------
    Attachment: LUCENE-5961.patch


Minimal test showing the problem.

I haven't looked in depth, but i think the same basic problem exists in, and can easily be fixed in, MultiFloatFunction, DualFloatFunction, MultiBoolFunction & DualFloatFunction ... may be more.


I'm happy to dig into this more when i get back from vacation (write more tests, etc...) but before i bother: does anyone _disagree_ with this statement:

{panel:title=Expected Behavior}
FunctionValues returned by ValueSources that model math functions, and which wrap other sub-FunctionValues, should generally implement {{exists(doc)}} by returning "true" if and only if the exists method of _all_ of the sub-FunctionValues it wraps returns "true" for that document
{panel}

> FunctionValues.exist(int) isn't returning false in cases where it should for many "math" based value sources
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-5961
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5961
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Hoss Man
>         Attachments: LUCENE-5961.patch
>
>
> The FunctionValues class contains an exist(int doc) method with a default implementation that returns true - field based DocValues override this method as appropriate, but most of the "function" based subclasses in the code (typically anonymous subclasses of "FloatDocValues") don't override this method when wrapping other ValueSources.
> So for example: the FunctionValues returned by ProductFloatFunction.getValues() will say that a value exists for any doc, even if that ProductFloatFunction wraps two FloatFieldSources that don't exist for any docs



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