Query Builder multi path search
Why the following query
type=cq:Page
1_group.1_path=/content/we-retail/it
1_group.2_path=/content/we-retail/fr
1_group.3_path=/content/we-retail/us
1_group.p.or=true
orderby=@jcr:lastModified
orderby.sort=desc
produce this error:
Could not run xpath query
javax.jcr.query.InvalidQueryException: java.text.ParseException: (/jcr:root/content/we-retail/it//element(*, cq:Page) | /jcr:root/content/we-retail/fr//element(*, cq:Page) | /jcr:root/content/we-retail/us//element(*, cq:Page)) order by @jcr:lastModified descending converted to SQL-2 Query: select [jcr:path], [jcr:score], * from [cq:Page] as a where isdescendantnode(a, '/content/we-retail/it') /* xpath: /jcr:root/content/we-retail/it//element(*, cq:Page) order by @jcr:lastModified descending */ union select [jcr:path], [jcr:score], * from [cq:Page] as a where isdescendantnode(a, '/content/we-retail/fr') /* xpath: /jcr:root/content/we-retail/fr//element(*, cq:Page) order by @jcr:lastModified descending */ order by [jcr:lastModified] desc union(*)select [jcr:path], [jcr:score], * from [cq:Page] as a where isdescendantnode(a, '/content/we-retail/us') /* xpath: /jcr:root/content/we-retail/us//element(*, cq:Page) order by @jcr:lastModified descending */ order by [jcr:lastModified] desc; expected: <end>
NB: if I remove a path the query is successfully executed. If I remove the orderBy and leave the three paths the query is successfully executed, but naturally the results are not ordered.
Please help me.
Thanks