[
https://issues.apache.org/jira/browse/OAK-4265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thomas Mueller updated OAK-4265:
--------------------------------
Fix Version/s: (was: 1.6)
1.5.12
> XPath: support limited form of "union"
> --------------------------------------
>
> Key: OAK-4265
> URL: https://issues.apache.org/jira/browse/OAK-4265
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Fix For: 1.5.12
>
>
> Currently, SQL-2 supports multiple paths restrictions combined with "or", and
> it supports "union". XPath doesn't support either. It would be good if this
> is supported, specially the "multiple paths" part.
> I think it makes sense to convert this to a SQL-2 "union" in all cases, even
> if it's just multiple paths.
> It doesn't need to be a "generic" solution, so that "|" doesn't need to be
> supported at every place (for example in the condition, or in the "order
> by"). But it would be nice if multiple independent queries, with one order
> by, could be supported.
> Implementation note: what makes this a bit complicated is support for "order
> by".
> For example:
> {noformat}
> /jcr:root/(content|lib)/element(*, nt:base) order by @title
> select [jcr:path], [jcr:score], *
> from [nt:base] as a
> where ischildnode(a, '/content')
> /* xpath: /jcr:root/content/element(*, nt:base) order by @title */
> union select [jcr:path], [jcr:score], *
> from [nt:base] as a
> where ischildnode(a, '/lib')
> /* xpath: /jcr:root/lib/element(*, nt:base) order by @title */
> order by [title]
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)