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

Paul Elschot commented on LUCENE-6373:
--------------------------------------

I'm posting this because it seems to be almost there,  I'll have very little 
time in the upcoming weeks, and to show that the asserting spans of LUCENE-6411 
nicely catch this.

The patch includes the use of DisiPriorityQueue<Scorer> instead of 
ScorerPriorityQueue, otherwise there are no changes in the class hierarchy 
(DocIdSetIterator, DisiWrapper) compared to the previous patch.


The stack trace for the failing test is:
{code}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestBasics 
-Dtests.method=testSpanComplex1 -Dtests.seed=BC9E11D8F8BBB280 -Dtests.slow=true 
-Dtests.locale=in_ID -Dtests.timezone=Australia/Sydney -Dtests.asserts=true 
-Dtests.file.encoding=US-ASCII
   [junit4] FAILURE 0.09s | TestBasics.testSpanComplex1 <<<
   [junit4]    > Throwable #1: java.lang.AssertionError: invalid position 
access, state=DOC_UNVERIFIED: 
NearSpansOrdered(spanNear([AssertingSpanQuery(field:seven), 
AssertingSpanQuery(field:hundred)], 0, true))@0: -1 - -1
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([BC9E11D8F8BBB280:9C85EFEAFD8D21EE]:0)
   [junit4]    >        at 
org.apache.lucene.search.spans.AssertingSpans.nextStartPosition(AssertingSpans.java:80)
   [junit4]    >        at 
org.apache.lucene.search.spans.SpanOrQuery$1.fillPositionQueue(SpanOrQuery.java:285)
   [junit4]    >        at 
org.apache.lucene.search.spans.SpanOrQuery$1.nextStartPosition(SpanOrQuery.java:300)
   [junit4]    >        at 
org.apache.lucene.search.spans.AssertingSpans.nextStartPosition(AssertingSpans.java:86)
   [junit4]    >        at 
org.apache.lucene.search.spans.NearSpansOrdered.subSpansToFirstStartPosition(NearSpansOrdered.java:133)
   [junit4]    >        at 
org.apache.lucene.search.spans.NearSpansOrdered.toMatchDoc(NearSpansOrdered.java:65)
   [junit4]    >        at 
org.apache.lucene.search.spans.NearSpans.nextDoc(NearSpans.java:65)
   [junit4]    >        at 
org.apache.lucene.search.spans.NearSpansOrdered.nextDoc(NearSpansOrdered.java:48)
   [junit4]    >        at 
org.apache.lucene.search.spans.AssertingSpans.nextDoc(AssertingSpans.java:151)
   [junit4]    >        at 
org.apache.lucene.search.spans.SpanScorer.nextDoc(SpanScorer.java:51)
   [junit4]    >        at 
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll(Weight.java:192)
   [junit4]    >        at 
org.apache.lucene.search.Weight$DefaultBulkScorer.score(Weight.java:164)
   [junit4]    >        at 
org.apache.lucene.search.BulkScorer.score(BulkScorer.java:35)
   [junit4]    >        at 
org.apache.lucene.search.AssertingBulkScorer.score(AssertingBulkScorer.java:69)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:563)
   [junit4]    >        at 
org.apache.lucene.search.AssertingIndexSearcher.search(AssertingIndexSearcher.java:102)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:367)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:486)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.searchAfter(IndexSearcher.java:344)
   [junit4]    >        at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:355)
   [junit4]    >        at 
org.apache.lucene.search.CheckHits.checkHits(CheckHits.java:170)
   [junit4]    >        at 
org.apache.lucene.search.spans.TestBasics.checkHits(TestBasics.java:408)
   [junit4]    >        at 
org.apache.lucene.search.spans.TestBasics.testSpanComplex1(TestBasics.java:398)
{code}


> Complete two phase doc id iteration support for Spans
> -----------------------------------------------------
>
>                 Key: LUCENE-6373
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6373
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Paul Elschot
>         Attachments: LUCENE-6373-SpanOr.patch, 
> LUCENE-6737-SpanOr-oneTestFails.patch
>
>
> Spin off from LUCENE-6308, see comments there from about 23 March 2015.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to