Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80A3FEF22 for ; Tue, 26 Feb 2013 20:10:14 +0000 (UTC) Received: (qmail 25495 invoked by uid 500); 26 Feb 2013 20:10:13 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 25356 invoked by uid 500); 26 Feb 2013 20:10:13 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 25349 invoked by uid 99); 26 Feb 2013 20:10:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2013 20:10:13 +0000 Date: Tue, 26 Feb 2013 20:10:13 +0000 (UTC) From: "Yonik Seeley (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-4800) FloatDocValues does not return true for 0 >< 1 values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LUCENE-4800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13587481#comment-13587481 ] Yonik Seeley commented on LUCENE-4800: -------------------------------------- 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