jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vikas Saurabh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OAK-6309) Not always convert XPath "primaryType in a, b" to union
Date Mon, 22 Jul 2019 09:13:00 GMT

     [ https://issues.apache.org/jira/browse/OAK-6309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vikas Saurabh updated OAK-6309:
-------------------------------
    Fix Version/s:     (was: 1.16.0)
                   1.18.0

> Not always convert XPath "primaryType in a, b" to union
> -------------------------------------------------------
>
>                 Key: OAK-6309
>                 URL: https://issues.apache.org/jira/browse/OAK-6309
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: query
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>            Priority: Critical
>             Fix For: 1.18.0
>
>
> Currently, queries with multiple primary types are always converted to a "union", but
this is not alway the best solution. The main problem is that results are not sorted by score
as expected. Example:
> {noformat}
> /jcr:root/content//element(*, nt:hierarchyNode)[jcr:contains(., 'abc)
> and (@jcr:primaryType = 'acme:Page' or @jcr:primaryType = 'acme:Asset')] 
> {noformat}
> This is currently converted to a union, even if the same index is used for buth subqueries
(assuming there is an index on nt:hierarchyNode).
> A workaround is to use:
> {noformat}
> /jcr:root/content//element(*, nt:hierarchyNode)[jcr:contains(., 'abc)
> and (./@jcr:primaryType = 'acme:Page' or ./@jcr:primaryType = 'acme:Asset')] 
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message