[
https://issues.apache.org/jira/browse/LUCENE-6276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15002373#comment-15002373
]
Adrien Grand commented on LUCENE-6276:
--------------------------------------
Hmm, I'm getting failures with ComplexPhraseQuery:
{noformat}
[junit4] Suite:
org.apache.lucene.queryparser.complexPhrase.TestComplexPhraseQuery
[junit4] 2> NOTE: reproduce with: ant test
-Dtestcase=TestComplexPhraseQuery -Dtests.method=testComplexPhrases
-Dtests.seed=E7F242A6F40525AB -Dtests.slow=true -Dtests.locale=in_ID
-Dtests.timezone=Africa/Banjul -Dtests.asserts=true
-Dtests.file.encoding=ISO-8859-1
[junit4] FAILURE 0.18s J2 | TestComplexPhraseQuery.testComplexPhrases <<<
[junit4] > Throwable #1: java.lang.AssertionError
[junit4] > at
__randomizedtesting.SeedInfo.seed([E7F242A6F40525AB:8259F91767B2FFA3]:0)
[junit4] > at
org.apache.lucene.search.spans.SpanOrQuery$SpanOrWeight$1.positionsCost(SpanOrQuery.java:261)
[junit4] > at
org.apache.lucene.search.spans.ScoringWrapperSpans.positionsCost(ScoringWrapperSpans.java:88)
[junit4] > at
org.apache.lucene.search.spans.FilterSpans$2.matchCost(FilterSpans.java:167)
[junit4] > at
org.apache.lucene.search.ConjunctionDISI$TwoPhaseConjunctionDISI.<init>(ConjunctionDISI.java:186)
[junit4] > at
org.apache.lucene.search.ConjunctionDISI$TwoPhaseConjunctionDISI.<init>(ConjunctionDISI.java:164)
[junit4] > at
org.apache.lucene.search.ConjunctionDISI$TwoPhase.<init>(ConjunctionDISI.java:227)
[junit4] > at
org.apache.lucene.search.ConjunctionDISI$TwoPhase.<init>(ConjunctionDISI.java:221)
[junit4] > at
org.apache.lucene.search.ConjunctionDISI.intersect(ConjunctionDISI.java:50)
[junit4] > at
org.apache.lucene.search.spans.ConjunctionSpans.<init>(ConjunctionSpans.java:43)
[junit4] > at
org.apache.lucene.search.spans.NearSpansOrdered.<init>(NearSpansOrdered.java:56)
[junit4] > at
org.apache.lucene.search.spans.SpanNearQuery$SpanNearWeight.getSpans(SpanNearQuery.java:223)
[junit4] > at
org.apache.lucene.search.spans.SpanWeight.scorer(SpanWeight.java:134)
[junit4] > at
org.apache.lucene.search.Weight.bulkScorer(Weight.java:135)
[junit4] > at
org.apache.lucene.search.AssertingWeight.bulkScorer(AssertingWeight.java:69)
[junit4] > at
org.apache.lucene.search.AssertingWeight.bulkScorer(AssertingWeight.java:69)
[junit4] > at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:667)
[junit4] > at
org.apache.lucene.search.AssertingIndexSearcher.search(AssertingIndexSearcher.java:92)
[junit4] > at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:474)
[junit4] > at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:593)
[junit4] > at
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:451)
[junit4] > at
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:462)
[junit4] > at
org.apache.lucene.queryparser.complexPhrase.TestComplexPhraseQuery.checkMatches(TestComplexPhraseQuery.java:116)
[junit4] > at
org.apache.lucene.queryparser.complexPhrase.TestComplexPhraseQuery.testComplexPhrases(TestComplexPhraseQuery.java:58)
[junit4] > at java.lang.Thread.run(Thread.java:745)
[junit4] 2> NOTE: test params are: codec=Asserting(Lucene60):
{role=PostingsFormat(name=Memory doPackFST= false),
name=PostingsFormat(name=LuceneFixedGap),
id=PostingsFormat(name=LuceneFixedGap)}, docValues:{},
sim=RandomSimilarityProvider(queryNorm=true,coord=no): {role=DFR I(n)LZ(0.3),
name=DFR I(n)3(800.0), id=DFR I(n)3(800.0)}, locale=in_ID,
timezone=Africa/Banjul
[junit4] 2> NOTE: Linux 3.13.0-68-generic amd64/Oracle Corporation
1.8.0_66-ea (64-bit)/cpus=8,threads=1,free=187449736,total=253231104
[junit4] 2> NOTE: All tests run in this JVM:
[TestNumericRangeQueryBuilder, TestExtendableQueryParser, TestSpanQueryParser,
TestExtensions, TestComplexPhraseQuery]
[junit4] Completed [11/27] on J2 in 0.50s, 5 tests, 1 failure <<< FAILURES!
{noformat}
I haven't looked into it yet.
> Add matchCost() api to TwoPhaseDocIdSetIterator
> -----------------------------------------------
>
> Key: LUCENE-6276
> URL: https://issues.apache.org/jira/browse/LUCENE-6276
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Robert Muir
> Attachments: LUCENE-6276-ExactPhraseOnly.patch,
> LUCENE-6276-NoSpans.patch, LUCENE-6276-NoSpans2.patch, LUCENE-6276.patch,
> LUCENE-6276.patch, LUCENE-6276.patch, LUCENE-6276.patch, LUCENE-6276.patch,
> LUCENE-6276.patch, LUCENE-6276.patch
>
>
> We could add a method like TwoPhaseDISI.matchCost() defined as something like
> estimate of nanoseconds or similar.
> ConjunctionScorer could use this method to sort its 'twoPhaseIterators' array
> so that cheaper ones are called first. Today it has no idea if one scorer is
> a simple phrase scorer on a short field vs another that might do some geo
> calculation or more expensive stuff.
> PhraseScorers could implement this based on index statistics (e.g.
> totalTermFreq/maxDoc)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]