In AEM you are able to use the "relate" function e.g. source, derived and others to associate files in AEM Assets. My question is are you able to use the query builder to target and return a list of related assets?
Solved! Go to Solution.
Views
Replies
Total Likes
Try below queries
1) path=/content/dam
1_property=jcr:content/related/derived/sling:members/@sling:resources
1_property.value=/content/dam%
1_property.operation=like
p.limit=-1
2) type=dam:Asset
p.hits=selective
1_property=jcr:content/related/derived/sling:members/@sling:resources
1_property.value=/content/dam%
1_property.operation=like
p.limit=-1
In both the results I am getting the results.
To return the json below is the link for above query
In order to return results in desired format, you can write a servlet which will process the output of query builder and add the response to required format.
Hi,
Yes, the related assets are added to related node under jcr:content
We can retrieve all the nodes related assets available under the path
{assets}/jcr:content/related/derived/sling:members
Am I able to use this as part of querying other properties?
Here is an example:
type=dam:Asset
p.hits=selective
p.limit=-1
p.properties=jcr:content/metadata/dc:title jcr:content/metadata/dc:description jcr:content/related/derived/sling:members
When I add your recommendation to my query it comes back in the JSON but is blank even when there are relationships made with the assets main folder path. What I was hoping is that it would return paths for related assets. The use case is I'm using the "Others" related option to associate Videos with their VTT files and would like to show that relationship in the JSON query with some other metadata I need to be shown.
}
Try below queries
1) path=/content/dam
1_property=jcr:content/related/derived/sling:members/@sling:resources
1_property.value=/content/dam%
1_property.operation=like
p.limit=-1
2) type=dam:Asset
p.hits=selective
1_property=jcr:content/related/derived/sling:members/@sling:resources
1_property.value=/content/dam%
1_property.operation=like
p.limit=-1
In both the results I am getting the results.
To return the json below is the link for above query
In order to return results in desired format, you can write a servlet which will process the output of query builder and add the response to required format.
Views
Likes
Replies
Views
Likes
Replies