JCR Query to select data from one parent path and at the same time exculding a child path
For example
I want to select all nt:unstructured PDF nodes under en folder except nodes falling under investor-resource folder
select * from [nt:unstructured] as p
where
(isdescendantnode (p, [/content/dam/gsam/pdfs/us/en/])
AND NOT isdescendantnode (p, [/content/dam/gsam/pdfs/us/en/investor-resources]))
and contains(p.*, 'application/pdf')
For example
I want to select all nt:unstructured PDF nodes under en folder except nodes falling under investor-resource folder
select * from [nt:unstructured] as p
where
(isdescendantnode (p, [/content/dam/gsam/pdfs/us/en/])
AND NOT isdescendantnode (p, [/content/dam/gsam/pdfs/us/en/investor-resources]))
and contains(p.*, 'application/pdf')