[
https://issues.apache.org/jira/browse/LUCENE-3600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13157972#comment-13157972
]
Michael McCandless commented on LUCENE-3600:
--------------------------------------------
Hmm, the docID passed to BJQ's advance should be from the parent docID space
(ie, obtained from a parent-level query you're ANDing with).
I can't get a test case to fail, if indeed the parent has a child doc...
Do you have a case (Query) where a non-parent docID is passed to BJQ.advance?
Separately, I think you're right: if we change that "assert parentTarget != 0"
instead to "if (parentDoc == 0) return nextDoc();", then BJQ can support
parents w/ no children (which can never match, since BJQ does effectively an
inner join).
> BlockJoinQuery advance fails on an assert in case of a single parent with
> child segment
> ---------------------------------------------------------------------------------------
>
> Key: LUCENE-3600
> URL: https://issues.apache.org/jira/browse/LUCENE-3600
> Project: Lucene - Java
> Issue Type: Bug
> Components: modules/join
> Affects Versions: 3.5, 4.0
> Reporter: Shay Banon
> Assignee: Michael McCandless
> Fix For: 3.6, 4.0
>
>
> The BlockJoinQuery will fail on an assert when advance in called on a segment
> with a single parent with a child. The call to
> parentBits.prevSetBit(parentTarget - 1) will cause -1 to be returned, and the
> assert will fail, though its valid. Just removing the assert fixes the
> problem, since nextDoc will handle it properly.
> Also, I don't understand the "assert parentTarget != 0;", with a comment of
> each parent must have one child. There isn't really a reason to add this
> constraint, as far as I can tell..., just call nextDoc in this case, no?
--
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: [email protected]
For additional commands, e-mail: [email protected]