I am stuck finding a solution to the below:
My content folder structure looks as follows:
Both the parentFolder and its children folders contain files. Now, I want to write a query that only gets data from the parentFolder and childFolderA , but not from the other children folders.
Please note, There are many children folders , so I was be able to use a NOT clause.
Below are the SQL and XPath queries I tried, but did not give me the desired result:
SQL : select * from hippo:handle WHERE jcr:path LIKE ‘/content/%/parentFolderA/%’ OR jcr:path LIKE ‘/content/%/parentFolderA/childFolderA/%’
Error: javax.jcr.query.InvalidQueryException: Invalid combination of jcr:path clauses
XPATH Query : /jcr:root/content//parentFolderA/element(, hippo:handle) | /jcr:root/content//parentFolderA/childFolderA/element(, hippo:handle)
The XPath query does not throw an error and does not give me any results as well.
Please note , i have to apply an offset and limit on the query , so I wont be able to split them into individual queries.
I really appreciate your help. Thank you in advance.