When i use the below query on AEM QueryDebug
path=/content/dam/we-retail
type=dam:Asset
p.limit=-1
p.nodedepth=2
p.hits=full
p.guesstotal=true
And the formed URL/JSON QueryBuilder link.
I can see all the properties for each asset including jcr:content, metadata as below:
I need to return the same result to service/endpoint i'm building on AEM for a customer. When I translate the same above query into Query builder API
queryParamsMap.put("type", "dam:Asset");
queryParamsMap.put("p.limit", "-1");
queryParamsMap.put("p.nodedepth", "2");
queryParamsMap.put("p.hits", "full");
queryParamsMap.put("p.guessTotal", "true");
How can i retrieve all the values?
SearchResult result = query.getResult();
for (final Hit hit : result.getHits()) {
Resource resource = hit.getResource();
Asset asset = resource.adaptTo(Asset.class);
If i use asset.getMetadata(), we can see only the properties under jcr:content\metadata but not the other properties.
and
if i use ValueMap properties = resource.getValueMap(); we can retrieve all the asset properties (like jcr:path, jcr:primaryType etc) but not "metadata".
Is there any way to get all the values for an Asset node?

