I'm using query builder to search for images in DAM. I use predicates to do that. I'm trying to check metadata dam:MIMEtype property, to return all nodes which starts from image/.
How can I do that?
aemquery-builder
I'm using query builder to search for images in DAM. I use predicates to do that. I'm trying to check metadata dam:MIMEtype property, to return all nodes which starts from image/.
How can I do that?
Best Solution
You can use the JcrPropertyPredicateEvaluator to achieve the same.
Assuming that you are searching the path
/content/dam
for alldam:Asset
's whosedam:MIMEtype
starts withimage/
the query would beThe corresponding XPATH query would be
You can try executing the above query in your instance's query debugger(
/libs/cq/search/content/querydebug.html
) and verify if the results are fine.PredicateEvaluator Docs and the QueryBuilder API might provide more insights on writing queries.