I am stuck finding a solution to the below:
My content folder structure looks as follows:
/root/content/documents/…/…/parentFolder:
- childFolderA
- childFolderB
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
Part you are interested in is in “Scope the Query with HstQueryBuilder” parameter.
You can also call query.toString() to see created xpath (if you need xpath )
If I have the same parentFolderA/childFolderA structure (with the same names) under different folders across my root directory, I wont be able to use the UUID in that case.
The issue I am facing is my OR (pipeline operator) condition isnt working as expected on the hippo repository browser when I try to union two query results together.