From dev-return-80600-apmail-lucene-dev-archive=lucene.apache.org@lucene.apache.org Sat Oct 1 01:07:12 2011 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 579537E9B for ; Sat, 1 Oct 2011 01:07:12 +0000 (UTC) Received: (qmail 65559 invoked by uid 500); 1 Oct 2011 01:07:10 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 65505 invoked by uid 500); 1 Oct 2011 01:07:10 -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 65497 invoked by uid 99); 1 Oct 2011 01:07:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 01:07:10 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Oct 2011 01:07:07 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 89BC92A16B8 for ; Sat, 1 Oct 2011 01:06:45 +0000 (UTC) Date: Sat, 1 Oct 2011 01:06:45 +0000 (UTC) From: "Robert Muir (Commented) (JIRA)" To: dev@lucene.apache.org Message-ID: <469993660.14275.1317431205566.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1635189136.11934.1317401085579.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (LUCENE-3478) TestSimpleExplanations failure MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118611#comment-13118611 ] Robert Muir commented on LUCENE-3478: ------------------------------------- Hmm good find: maybe DefaultSimilarity's explain() should be more carefully implemented so that order of operations is the same? Depending upon your implementation of queryNorm (RandomSimilarityProvider is disabling it in this situation), then the differences between score and explain due to floating point precision can be quite severe? > TestSimpleExplanations failure > ------------------------------ > > Key: LUCENE-3478 > URL: https://issues.apache.org/jira/browse/LUCENE-3478 > Project: Lucene - Java > Issue Type: Bug > Components: core/search > Reporter: Michael McCandless > Fix For: 4.0 > > > {noformat} > ant test -Dtestcase=TestSimpleExplanations -Dtestmethod=testDMQ8 -Dtests.seed=144152895b276837:eb7ba4953db943f:33373b79a971db02 > {noformat} > fails w/ this on current trunk... looks like silly floating point precision issue: > {noformat} > [junit] Testsuite: org.apache.lucene.search.TestSimpleExplanations > [junit] 1.4508595 = (MATCH) sum of: > [junit] 1.4508595 = (MATCH) weight(field:yy in 2) [DefaultSimilarity], result of: > [junit] 1.4508595 = score(doc=2,freq=1.0 = termFreq=1 > [junit] ), product of: > [junit] 1.287682 = queryWeight, product of: > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 1.0 = queryNorm > [junit] 1.1267219 = fieldWeight in 2, product of: > [junit] 1.0 = tf(freq=1.0), with freq of: > [junit] 1.0 = termFreq=1 > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 0.875 = fieldNorm(doc=2) > [junit] 145085.95 = (MATCH) weight(field:xx^100000.0 in 2) [DefaultSimilarity], result of: > [junit] 145085.95 = score(doc=2,freq=1.0 = termFreq=1 > [junit] ), product of: > [junit] 128768.2 = queryWeight, product of: > [junit] 100000.0 = boost > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 1.0 = queryNorm > [junit] 1.1267219 = fieldWeight in 2, product of: > [junit] 1.0 = tf(freq=1.0), with freq of: > [junit] 1.0 = termFreq=1 > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 0.875 = fieldNorm(doc=2) > [junit] expected:<145086.66> but was:<145086.69>) > [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.544 sec > [junit] > [junit] ------------- Standard Error ----------------- > [junit] NOTE: reproduce with: ant test -Dtestcase=TestSimpleExplanations -Dtestmethod=testDMQ8 -Dtests.seed=144152895b276837:eb7ba4953db943f:33373b79a971db02 > [junit] NOTE: test params are: codec=PreFlex, sim=RandomSimilarityProvider(queryNorm=false,coord=false): {field=DefaultSimilarity, alt=DFR I(ne)LZ(0.3), KEY=IB LL-D2}, locale=en_IN, timezone=Pacific/Samoa > [junit] NOTE: all tests run in this JVM: > [junit] [TestSimpleExplanations] > [junit] NOTE: Linux 2.6.33.6-147.fc13.x86_64 amd64/Sun Microsystems Inc. 1.6.0_21 (64-bit)/cpus=24,threads=1,free=130426744,total=189988864 > [junit] ------------- ---------------- --------------- > [junit] Testcase: testDMQ8(org.apache.lucene.search.TestSimpleExplanations): FAILED > [junit] ((field:yy field:w5^100.0) | field:xx^100000.0)~0.5: score(doc=2)=145086.66 != explanationScore=145086.69 Explanation: 145086.69 = (MATCH) max plus 0.5 times others of: > [junit] 1.4508595 = (MATCH) sum of: > [junit] 1.4508595 = (MATCH) weight(field:yy in 2) [DefaultSimilarity], result of: > [junit] 1.4508595 = score(doc=2,freq=1.0 = termFreq=1 > [junit] ), product of: > [junit] 1.287682 = queryWeight, product of: > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 1.0 = queryNorm > [junit] 1.1267219 = fieldWeight in 2, product of: > [junit] 1.0 = tf(freq=1.0), with freq of: > [junit] 1.0 = termFreq=1 > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 0.875 = fieldNorm(doc=2) > [junit] 145085.95 = (MATCH) weight(field:xx^100000.0 in 2) [DefaultSimilarity], result of: > [junit] 145085.95 = score(doc=2,freq=1.0 = termFreq=1 > [junit] ), product of: > [junit] 128768.2 = queryWeight, product of: > [junit] 100000.0 = boost > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 1.0 = queryNorm > [junit] 1.1267219 = fieldWeight in 2, product of: > [junit] 1.0 = tf(freq=1.0), with freq of: > [junit] 1.0 = termFreq=1 > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 0.875 = fieldNorm(doc=2) > [junit] expected:<145086.66> but was:<145086.69> > [junit] junit.framework.AssertionFailedError: ((field:yy field:w5^100.0) | field:xx^100000.0)~0.5: score(doc=2)=145086.66 != explanationScore=145086.69 Explanation: 145086.69 = (MATCH) max plus 0.5 times others of: > [junit] 1.4508595 = (MATCH) sum of: > [junit] 1.4508595 = (MATCH) weight(field:yy in 2) [DefaultSimilarity], result of: > [junit] 1.4508595 = score(doc=2,freq=1.0 = termFreq=1 > [junit] ), product of: > [junit] 1.287682 = queryWeight, product of: > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 1.0 = queryNorm > [junit] 1.1267219 = fieldWeight in 2, product of: > [junit] 1.0 = tf(freq=1.0), with freq of: > [junit] 1.0 = termFreq=1 > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 0.875 = fieldNorm(doc=2) > [junit] 145085.95 = (MATCH) weight(field:xx^100000.0 in 2) [DefaultSimilarity], result of: > [junit] 145085.95 = score(doc=2,freq=1.0 = termFreq=1 > [junit] ), product of: > [junit] 128768.2 = queryWeight, product of: > [junit] 100000.0 = boost > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 1.0 = queryNorm > [junit] 1.1267219 = fieldWeight in 2, product of: > [junit] 1.0 = tf(freq=1.0), with freq of: > [junit] 1.0 = termFreq=1 > [junit] 1.287682 = idf(docFreq=2, maxDocs=4) > [junit] 0.875 = fieldNorm(doc=2) > [junit] expected:<145086.66> but was:<145086.69> > [junit] at org.apache.lucene.search.CheckHits.verifyExplanation(CheckHits.java:324) > [junit] at org.apache.lucene.search.CheckHits$ExplanationAsserter.collect(CheckHits.java:494) > [junit] at org.apache.lucene.search.Scorer.score(Scorer.java:60) > [junit] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:580) > [junit] at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:363) > [junit] at org.apache.lucene.search.CheckHits.checkExplanations(CheckHits.java:302) > [junit] at org.apache.lucene.search.QueryUtils.checkExplanations(QueryUtils.java:92) > [junit] at org.apache.lucene.search.QueryUtils.check(QueryUtils.java:126) > [junit] at org.apache.lucene.search.QueryUtils.check(QueryUtils.java:122) > [junit] at org.apache.lucene.search.QueryUtils.check(QueryUtils.java:106) > [junit] at org.apache.lucene.search.CheckHits.checkHitCollector(CheckHits.java:89) > [junit] at org.apache.lucene.search.TestExplanations.qtest(TestExplanations.java:99) > [junit] at org.apache.lucene.search.TestSimpleExplanations.testDMQ8(TestSimpleExplanations.java:224) > [junit] at org.apache.lucene.util.LuceneTestCase$2$1.evaluate(LuceneTestCase.java:611) > [junit] at org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:148) > [junit] at org.apache.lucene.util.LuceneTestCaseRunner.runChild(LuceneTestCaseRunner.java:50) > [junit] > [junit] > [junit] Test org.apache.lucene.search.TestSimpleExplanations FAILED > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa 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