Expand my Community achievements bar.

order by property ignores nodes without that property

Avatar

Level 1

Hi everybody!

I have a predicate like this:

map.put("1_"+Predicate.ORDER_BY, "@jcr:content/date");
map.put("2_"+Predicate.ORDER_BY, "@jcr:score");

The jcr:content/date is a custom property which is not set on all the nodes, my problem is that the result ignores all those nodes without a

jcr:content/date, Is there a way to get all the data, sorted by score if date is missing.

I was thinking to perform 2 queries, one to get all with date property and then merge both, but I want to know if there is another way to accomplish these

1 Reply

Avatar

Level 10

I believe that is correct functionality- if the node is missing that prop - then it cannot be included in the order.