Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

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

Avatar

Level 3

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

Level 6

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 3

Thanks @arunpatidar , this has helped. 

I am able to achieve the results using SQL Query.

 

Thanks, 

Poovitha S