Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

In Query Builder , Is there any way we can filter based on path of the Results

Avatar

Level 4

I am writing a query to search documents across folders, there is no tags or anything specifying category,

Only difference is the parent folder of the documents. Across different business unit , documents were placed under specific folder name. 

I want to search across those different units and get result based on category (foldername).

Is there any query/ property / Predicate to achieve the same.

 

My Current Query:

path=/content/dam/mchp/documents
type=dam:Asset
mainasset=true
p.limit=-1

 

 

This Query will give all category , I want items which is under particular folder name across main documents folder. 

 

Thanks in Advance,

Poovitha S

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

In querybuilder API we don't have any nodename predicate but this can be achieved using SQL2 join query.

QueryBuilder API predicate reference : 
https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/query-builder/quer... 



Arun Patidar

View solution in original post

3 Replies

Avatar

Community Advisor

Hi,

Have you tried the orderby predicate to sort the result ? This may help.  

 

path=/content/dam/core-components-examples/library
type=dam:Asset
mainasset=true
orderby:path
p.limit=-1

 

Thanks,

Somen

Avatar

Correct answer by
Community Advisor

In querybuilder API we don't have any nodename predicate but this can be achieved using SQL2 join query.

QueryBuilder API predicate reference : 
https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/query-builder/quer... 



Arun Patidar

Avatar

Level 4

Thanks @arunpatidar , this has helped. 

I am able to achieve the results using SQL Query.

 

Thanks, 

Poovitha S