lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LUCENE-2751) add LuceneTestCase.newSearcher()
Date Mon, 31 Jan 2011 19:16:29 GMT

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

Robert Muir updated LUCENE-2751:
--------------------------------

    Attachment: LUCENE-2751.patch

patch, with all tests fixed to close their searchers. tests are passing but there are two
problems:
# see the nocommit in IndexSearcher, when it sets itself as its own child, this crazy recursive
thing happens. I don't understand why this code is needed, it shouldn't set itself as its
own child?
# some tests in spans fail when they are run with multiple threads. don't know whats going
on here:

{noformat}
junit-sequential:
    [junit] Testsuite: org.apache.lucene.search.spans.TestSpansAdvanced2
    [junit] Tests run: 4, Failures: 2, Errors: 0, Time elapsed: 0.833 sec
    [junit]
    [junit] ------------- Standard Output ---------------
    [junit] 0 warning, expected score: 0.625, actual 0.23211958
    [junit] 0.23211958 = (MATCH) fieldWeight(TEXT:should in 1), product of:
    [junit]   1.0 = tf(phraseFreq=1.0)
    [junit]   0.37139133 = idf(TEXT:  should=14)
    [junit]   0.625 = fieldNorm(field=TEXT, doc=1)
    [junit]
    [junit] 0 warning, expected score: 1.0191123, actual 0.69635624
    [junit] 0.69635624 = (MATCH) sum of:
    [junit]   0.041781675 = (MATCH) weight(TEXT:should in 3), product of:
    [junit]     0.24494985 = queryWeight(TEXT:should), product of:
    [junit]       0.37139133 = idf(TEXT:  should=14)
    [junit]       0.6595465 = queryNorm
    [junit]     0.17057237 = (MATCH) fieldWeight(TEXT:should in 3), product of:
    [junit]       1.2247449 = tf(phraseFreq=1.5)
    [junit]       0.37139133 = idf(TEXT:  should=14)
    [junit]       0.375 = fieldNorm(field=TEXT, doc=3)
    [junit]   0.6545746 = (MATCH) weight(TEXT:we in 3), product of:
    [junit]     0.9695357 = queryWeight(TEXT:we), product of:
    [junit]       1.4700036 = idf(TEXT:  we=4)
    [junit]       0.6595465 = queryNorm
    [junit]     0.6751423 = (MATCH) fieldWeight(TEXT:we in 3), product of:
    [junit]       1.2247449 = tf(phraseFreq=1.5)
    [junit]       1.4700036 = idf(TEXT:  we=4)
    [junit]       0.375 = fieldNorm(field=TEXT, doc=3)
    [junit]
    [junit] ------------- ---------------- ---------------
    [junit] ------------- Standard Error -----------------
    [junit] NOTE: reproduce with: ant test -Dtestcase=TestSpansAdvanced2 -Dtestmethod=testSingleSpanQuery
-Dtests.seed=5923986663359901096:-8292211890903536598
    [junit] NOTE: reproduce with: ant test -Dtestcase=TestSpansAdvanced2 -Dtestmethod=testMultipleDifferentSpanQueries
-Dtests.seed=5923986663359901096:-2877104144909248514
    [junit] NOTE: test params are: codec=RandomCodecProvider: {TEXT=MockVariableIntBlock(baseBlockSize=59),
ID=Pulsing(freqCutoff=12)}, locale=pl, timezone=Africa/Lubumbashi
    [junit] NOTE: all tests run in this JVM:
    [junit] [TestSpansAdvanced2]
    [junit] NOTE: Windows Vista 6.0 x86/Sun Microsystems Inc. 1.6.0_23 (32-bit)/cpus=4,threads=1,free=6497408,total=28114944
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testSingleSpanQuery(org.apache.lucene.search.spans.TestSpansAdvanced2):
  FAILED
    [junit] expected:<0.625> but was:<0.2321195751428604>
    [junit] junit.framework.AssertionFailedError: expected:<0.625> but was:<0.2321195751428604>
    [junit]     at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1183)
    [junit]     at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1115)
    [junit]     at org.apache.lucene.search.spans.TestSpansAdvanced.assertHits(TestSpansAdvanced.java:172)
    [junit]     at org.apache.lucene.search.spans.TestSpansAdvanced2.testSingleSpanQuery(TestSpansAdvanced2.java:93)
    [junit]
    [junit]
    [junit] Testcase: testMultipleDifferentSpanQueries(org.apache.lucene.search.spans.TestSpansAdvanced2):
     FAILED
    [junit] expected:<1.0191123485565186> but was:<0.6963562369346619>
    [junit] junit.framework.AssertionFailedError: expected:<1.0191123485565186> but
was:<0.6963562369346619>
    [junit]     at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1183)
    [junit]     at org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1115)
    [junit]     at org.apache.lucene.search.spans.TestSpansAdvanced.assertHits(TestSpansAdvanced.java:172)
    [junit]     at org.apache.lucene.search.spans.TestSpansAdvanced2.testMultipleDifferentSpanQueries(TestSpansAdvanced2.java:113)
    [junit]
    [junit]
    [junit] Test org.apache.lucene.search.spans.TestSpansAdvanced2 FAILED
{noformat}


> add LuceneTestCase.newSearcher()
> --------------------------------
>
>                 Key: LUCENE-2751
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2751
>             Project: Lucene - Java
>          Issue Type: Test
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 4.0
>
>         Attachments: LUCENE-2751.patch, LUCENE-2751.patch, LUCENE-2751.patch, LUCENE-2751.patch,
LUCENE-2751.patch, LUCENE-2751.patch
>
>
> Most tests in the search package don't care about what kind of searcher they use.
> we should randomly use MultiSearcher or ParallelMultiSearcher sometimes in tests.

-- 
This message is automatically generated by JIRA.
-
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


Mime
View raw message