dam search/sort based on file size

708 views Asked by At

How can I sort my search based on file size in DAM. I'm trying this and the sorting doesn't seem to work maybe because dam:size is a string:

type=dam:Asset
path=/content/dam/<my_project>
nodename=*.pdf
orderby=@jcr:content/metadata/dam:size
orderby.sort=desc
1

There are 1 answers

0
bfitzpatrick On BEST ANSWER

With XPath, you can do it like this: /jcr:root/content/dam/<site>//element(*,dam:Asset) order by jcr:content/metadata/@dam:size descending