You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Thomas Mueller (JIRA)" <ji...@apache.org> on 2014/02/19 14:50:20 UTC

[jira] [Commented] (OAK-1432) Query: use "union" for complex XPath queries that use multiple "or"

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

Thomas Mueller commented on OAK-1432:
-------------------------------------

A similar query is:

{noformat}
//*[((@jcr:primaryType = 'nt:unstructured' and (@p1 = 'x' or @p2 = 'x')) 
or (@p3 = 'x' and @jcr:primaryType = 'nt:folder')) ] 
{noformat}

Where all properties p1 .. p3 are indexed.

> Query: use "union" for complex XPath queries that use multiple "or"
> -------------------------------------------------------------------
>
>                 Key: OAK-1432
>                 URL: https://issues.apache.org/jira/browse/OAK-1432
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Thomas Mueller
>            Assignee: Thomas Mueller
>             Fix For: 0.18
>
>
> The following XPath query is converted to a union, however there is still an "or" in the converted query, which means the query still can't use all indexes and has to traverse the whole repository:
> {noformat}
> /jcr:root/a/b//element(*, nt:unstructured)[(
> (@sling:resourceType = 'x' 
> or @sling:resourceType = 'dam/collection') 
> or @sling:resourceSuperType = 'dam/collection')] 
> {noformat}



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