I want to search files in my DAM folder using querybuilder. In my test folder, I have 1 .pptx file (powerpoint) and 1 .png file (image).
But when I run the below query, I get 3 results:
1. <PPTX file>/jcr:content
2. <PPTX file>.jcr:content/subassets/slide1/jcr:content
3 <image file>/jcr:content
The query is:
path=/content/dam/my-folder
type=dam:AssetContent
p.limit=-1
Are there any other predicates available to restrict this to 2 results, (files only) ?
I've tried "type=dam:Asset"
, but it gives 0 results. and "type=nt:base"
gives 20 results
Below AEM 6.3 -
Use
path.flat
predicate to narrow down the search to only the direct children and not thesubtree
.You can also use
nodename
predicate to query node names with a specific file extension