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

Jukka Zitting commented on OAK-1215:
------------------------------------

FWIW, the equivalent SQL2 would be something like this:

{code:sql}
SELECT a.* FROM [nt:base] AS a LEFT OUTER JOIN [nt:base] AS b ON 
ISDESCENDANTNODE(b, a)
WHERE ISDESCENDANTNODE(a, [/etc/commerce/products]) AND ((a.size='M' AND 
b.[jcr:primaryType] IS NULL) OR b.size='M')
{code}

It should be possible to execute such a join reasonably efficiently.

> Relative property paths don't work in XPath search expressions
> --------------------------------------------------------------
>
>                 Key: OAK-1215
>                 URL: https://issues.apache.org/jira/browse/OAK-1215
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Jeff Young
>            Priority: Critical
>         Attachments: relative-predicate-paths.tiff
>
>
> A search XPath of the form:
> {code}
> /jcr:root/etc/commerce/products//*[@size='M' or */@size='M']
> {code}
> returns:
> {code}
> Invalid path: *
> {code}
> (This works fine in Jackrabbit.)



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to