jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (Jira)" <j...@apache.org>
Subject [jira] [Commented] (OAK-9310) Wrong result in Join query with contains condition
Date Wed, 06 Jan 2021 08:44:00 GMT

    [ https://issues.apache.org/jira/browse/OAK-9310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17259508#comment-17259508

Thomas Mueller commented on OAK-9310:

I don't think it's related to OAK-7166.

Could you post the Solr index definition, and the complete query plan please (best set log
level to debug for org.apache.jackrabbit.oak.query, and get the output from that).

> Wrong result in Join query with contains condition
> --------------------------------------------------
>                 Key: OAK-9310
>                 URL: https://issues.apache.org/jira/browse/OAK-9310
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 1.32.0
>            Reporter: Mohammad
>            Priority: Major
> I have problem with join query and contains condition. The condition is on join query
but when query converted to solr query, the condtion applied on main type. When I change contains
to equal the query convert and execute correctly.
> After debugging I found this query has two execution plan. when The query engine select
below plan it does not have any result but when use other plan it has result. This problem
caused random result in search feature.
> SQL2 query:
> {noformat}
> SELECT san_sinaBaseDossier.* 
> FROM [san:lkeBaseDossier] AS san_lkeBaseDossier 
> INNER JOIN [san:lkeBaseDocument] as san_lkeBaseDossier_san_documents 
> ON san_lkeBaseDossier_san_documents.[jcr:uuid] = san_lkeBaseDossier.[san:documents] 
> WHERE ((CONTAINS([san_lkeBaseDossier_san_documents].[san:docDesc], cast('*123*' AS string))))

> AND ISDESCENDANTNODE(san_lkeBaseDossier, '/contents/dossiers') 
> ORDER BY [san_lkeBaseDossier].[jcr:createdBy] DESC}}
> {noformat}
> Converted solr query:
> {noformat}
> q.op=AND
> &fl=path_exact+score
> &df=catch_all
> &rows=10
> &sort=jcr\:createdBy_string_sort+desc
> &fq=(jcr\:primaryType:san\:lkeBaseDossier+)+
> &fq=path_des:\/contents\/dossiers&fq=\{!collapse+field%3Dpath_collapsed+min%3Dpath_depth+hint%3Dtop_fc+nullPolicy%3Dexpand}
> &q=*123*+san\:documents:*+
> {noformat}

This message was sent by Atlassian Jira

View raw message