[
https://issues.apache.org/jira/browse/LUCENE-3600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13158285#comment-13158285
]
Shay Banon commented on LUCENE-3600:
------------------------------------
Thanks for fixing the parent with no children!. I think there is still a
problem with the assert on a single segment with one parent and child. I just
took your test case: testAdvanceSingleParentSingleChild and it fails for me
with asserts enabled on the "assert prevParentDoc >= parentDoc;" (I copied over
the code, having problems with Lucene IDEA project config now...).
Imagine there is a single parent and single child. Child is docId 0, and parent
is docId 1. A filter for the parent is used in conjunction with the child
query. The parent filter is used first, and returns docId 1, which then the
BlockJoinQuery advance is called. But, because its the first parent, this call:
"final int prevParentDoc = parentBits.prevSetBit(parentTarget - 1);" will cause
-1 to be returned, which will cause this assert: "assert prevParentDoc >=
parentDoc;" to fail (parentDoc is 0). Just removing the assert fixes the
problem.
> 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]