Hi All,
I have a requirement to choose a DAM Folder path which can contain n number of assets and each asset may or may not be tagged in its asset properties. I have to fetch the superset of tags of all assets under the folder using query manager API. Can anybody help with this ?
Solved! Go to Solution.
Views
Replies
Total Likes
Here's the query for finding all dam:Asset objects which does not have any tags configured. In layman's terms, find me all assets under the /content/dam/sourcedcode folder, where cq:tags does not exists.
type=dam:Asset
path=/content/dam/sourcedcode
property=jcr:content/metadata/cq:tags
property.operation=exists
property.value=false
p.limit=-1
Are you looking for all non-duplicate tags authored in asset properties for a given folder?
Use query builder api to fetch all assets with tags under the folder.
Hello @ayush_aem ,
For this requirement you can use,
path=/content/dam/my-project/image
property=jcr:content/metadata/cq:tags
property.operation=exists
p.limit=-1
By this query, you will get all the dam paths that have tags.
Then resolve the path resource (path/jcr:content/metadata/cq:tags) and get tags.
For the unique tags value get the Tag first and put it on a set.
Here's the query for finding all dam:Asset objects which does not have any tags configured. In layman's terms, find me all assets under the /content/dam/sourcedcode folder, where cq:tags does not exists.
type=dam:Asset
path=/content/dam/sourcedcode
property=jcr:content/metadata/cq:tags
property.operation=exists
property.value=false
p.limit=-1
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies