We are wanting to create a string of metadata values that will return only those wanted values as JSON. Can AEM Query builder be used to build this query or test it? If so, are there are documents around what metadata values are available?
Solved! Go to Solution.
Views
Replies
Total Likes
Let's assume I am targeting list of properties like dc:format , dam:size, dc:modified of each asset under specific DAM path /content/dam/we-retail/en/people/mens
So here is my query -
type=dam:Asset
path=/content/dam/we-retail/en/people/mens
p.hits=selective
p.properties=jcr:content/metadata/dc:format jcr:content/metadata/dam:size jcr:content/metadata/dc:modified
using p.properties , I have specified the properties I want to get in as shown below -
Now if I copy and JSON QueryBuilder link as shown below -
Then I am getting below JSON response -
Are you expecting this? Please correct me.
Please refer this: https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/query-builder/quer...
@jwendling You can write a java servlet to query metadata in jcr and return queried data as JSON object.
Ex:- https://aem4beginner.blogspot.com/a-servlet-to-query-pages-containing
Let's assume I am targeting list of properties like dc:format , dam:size, dc:modified of each asset under specific DAM path /content/dam/we-retail/en/people/mens
So here is my query -
type=dam:Asset
path=/content/dam/we-retail/en/people/mens
p.hits=selective
p.properties=jcr:content/metadata/dc:format jcr:content/metadata/dam:size jcr:content/metadata/dc:modified
using p.properties , I have specified the properties I want to get in as shown below -
Now if I copy and JSON QueryBuilder link as shown below -
Then I am getting below JSON response -
Are you expecting this? Please correct me.
Please refer this: https://experienceleague.adobe.com/docs/experience-manager-65/developing/platform/query-builder/quer...
@jwendling
AEM Query builder can be used to query the repository and get a list of nodes (javax.jcr.node) or hits (com.day.cq.search.result.Hit)
To get specific properties or metadata from each node, we will have to have custom implementations, via a sling model/OSGi servlet/OSGi service.
Hope this helps.
Views
Likes
Replies