[
https://issues.apache.org/jira/browse/LUCENE-6418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14491592#comment-14491592
]
Robert Muir commented on LUCENE-6418:
-------------------------------------
I found the bug. Its a bug I caused in span-not actually (I needed
AssertingSpans from LUCENE-6411 to "see" what was happening).
I will commit a fix with a TODO to make it less ugly.
> NearSpans[Payload]Ordered sometimes returns -1 for nextStartPosition()
> ----------------------------------------------------------------------
>
> Key: LUCENE-6418
> URL: https://issues.apache.org/jira/browse/LUCENE-6418
> Project: Lucene - Core
> Issue Type: Bug
> Reporter: Robert Muir
> Attachments: LUCENE-6418_test.patch
>
>
> It happens in both impls, so I think the problem is in
> NearSpansPayloadOrdered. Maybe atFirstInCurrentDoc gets set without
> matchStart getting set?
> Can be triggered more generally in tests like this:
> {code}
> @Override
> public int nextStartPosition() throws IOException {
> if (atFirstInCurrentDoc) {
> atFirstInCurrentDoc = false;
> assert matchStart >= 0; // add this assert
> return matchStart;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]