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

How to determine if images in DAM have tags not included to it and How many such images are there in DAM?

Avatar

Level 1

Hi All,

How to identify any recent images that have been added to the DAM that do not include any tagging in them and does not have title also. 

Can we run any query to get such assets path? I tried with some but with no luck.

Need your help with it.

Thanks in Advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Assuming this DAM path:

[img]tagsInDam.png[/img]

This would not be a one shot query to get this information. You need to use JCR SQL and some Java app logic to achieve this.

First - you would select all DAM Assets in a given path. 

Then for each dam asset - pass it to another method to query the metadata node (of type nt:unstructured):

<DAM ASSET>/jcr:content/metadata

Once you have the metadata node - you can check to see if that node has a cq:tags prop of type String[].

If so - place the DAM asset name into a collection. For those that do not - then place the DAM asset into another collection. Once you have gone through all DAM assets - the answer you are seeking is in the both collections. 

Hope this helps you.

View solution in original post

2 Replies

Avatar

Level 10

What queries have you used so far. Have you used QueryBuilder API or JCR API. 

Avatar

Correct answer by
Level 10

Assuming this DAM path:

[img]tagsInDam.png[/img]

This would not be a one shot query to get this information. You need to use JCR SQL and some Java app logic to achieve this.

First - you would select all DAM Assets in a given path. 

Then for each dam asset - pass it to another method to query the metadata node (of type nt:unstructured):

<DAM ASSET>/jcr:content/metadata

Once you have the metadata node - you can check to see if that node has a cq:tags prop of type String[].

If so - place the DAM asset name into a collection. For those that do not - then place the DAM asset into another collection. Once you have gone through all DAM assets - the answer you are seeking is in the both collections. 

Hope this helps you.