In Query Builder , Is there any way we can filter based on path of the Results | Community
Skip to main content
Level 3
March 20, 2023
Solved

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

  • March 20, 2023
  • 2 replies
  • 702 views

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

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/querybuilder-predicate-reference.html?lang=en 

2 replies

somen-sarkar
Community Advisor
Community Advisor
March 20, 2023

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

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
March 20, 2023

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/querybuilder-predicate-reference.html?lang=en 

Arun Patidar
Level 3
March 21, 2023

Thanks @arunpatidar , this has helped. 

I am able to achieve the results using SQL Query.

 

Thanks, 

Poovitha S