You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dr Oleg Savrasov (JIRA)" <ji...@apache.org> on 2014/01/08 09:26:53 UTC

[jira] [Commented] (LUCENE-5375) ToChildBlockJoinQuery becomes crazy on wrong subquery

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

Dr Oleg Savrasov commented on LUCENE-5375:
------------------------------------------

After some investigations I came to conclusion that existing assertions in ToChildBlockJoinScorer are not sufficient to guarantee child and parent documents orthogonality. In order to prove that, I've created a test which expects appropriate AssertionError, please see attached SOLR-5553-insufficient_assertions.patch. The test fails for example with -Dtests.seed=E8A0C61499EE8851:C5E7CB6721742C4F.

I have not found any way for correct validation other than checking parentBits. It costs retrieving appropriate bit from FixedBitSet, but it seems not too expensive.

The test is reworked in order to be Lucene-level and cover the cases when existing assertions are not sufficient. Please see attached SOLR-5553-1.patch.

> ToChildBlockJoinQuery becomes crazy on wrong subquery
> -----------------------------------------------------
>
>                 Key: LUCENE-5375
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5375
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/join
>    Affects Versions: 4.6
>            Reporter: Dr Oleg Savrasov
>              Labels: patch
>         Attachments: SOLR-5553.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> If user supplies wrong subquery to ToParentBlockJoinQuery it reasonably throws IllegalStateException. (http://lucene.apache.org/core/4_0_0/join/org/apache/lucene/search/join/ToParentBlockJoinQuery.html 'The child documents must be orthogonal to the parent documents: the wrapped child query must never return a parent document.'). However ToChildBlockJoinQuery just goes crazy silently. I want to provide simple patch for ToChildBlockJoinQuery with if-throw clause and test.
> See http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201311.mbox/%3CF415CE3A-EBE5-4D15-ADF1-C5EAD32A1EB2@sheffield.ac.uk%3E



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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