0
votes

I'm trying to rerun only the folders from a given path using query builder on AEM

Query:

path=/content/dam/we-retail/en
type=sling:OrderedFolder
p.hits=selective
p.nodedepth=1
p.limit=-1

Or URL http://localhost:4502/bin/querybuilder.json?p.hits=selective&p.limit=-1&p.nodedepth=1&path=%2fcontent%2fdam%2fwe-retail%2fen&type=sling%3aOrderedFolder

Screenshot of querybuilder test url

Screenshot of folders under we-retail/en

The query returns 35 records, while there are only 6 folders under /content/dam/we-retail/en. How can i return only these 6?

1

1 Answers

2
votes

If you are looking at returning only the direct children under a path, use the property path.flat=true.

path=/content/dam/we-retail/en
path.flat=true
type=sling:OrderedFolder
p.hits=selective
p.nodedepth=1
p.limit=-1

However, it is better to loop through the child nodes and identify the folders rather than querying in cases like this where you need only the direct children.

More about the Path Predicate Evaluator here.