You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2013/02/26 21:16:15 UTC

[jira] [Comment Edited] (LUCENE-4800) FloatDocValues does not return true for 0 >< 1 values

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

Yonik Seeley edited comment on LUCENE-4800 at 2/26/13 8:16 PM:
---------------------------------------------------------------

bq. the current patch will return 'true' for NaN

heh - good catch.  Changing to !(floatValue(doc) == 0) should work.

edit: actually I'm not sure we want NaN to return false... I just tried C, and NaN evaluates to true.  Only 0 evaluates to false.
                
      was (Author: yseeley@gmail.com):
    bq. the current patch will return 'true' for NaN

heh - good catch.  Changing to !(floatValue(doc) == 0) should work.

                  
> FloatDocValues does not return true for 0 >< 1 values
> -----------------------------------------------------
>
>                 Key: LUCENE-4800
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4800
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: 5.0
>         Environment: 5.0-SNAPSHOT 1427825:1444730M - markus - 2013-02-11 11:39:54
>            Reporter: Markus Jelsma
>             Fix For: 5.0
>
>         Attachments: LUCENE-4800-trunk.patch
>
>
> The following function query should always yield 1 if the document's field matchers the query:
> {code}if(query({!lucene df=FIELD v=$q},0),1,0){code}
> This is, however, not true if due to low IDF the score end up below 1 but, obviously, above 0. The if() statement does not recognize a number between zero and one as positive and therefore TRUE.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org