0

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
stdio.h
  • 126
  • 3
  • 15

1 Answers1

2

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

bfitzpatrick
  • 1,513
  • 11
  • 13