Sortby two Values at a time
Hi Community,
I am trying to sort by two kinds of Pages together. Basically, I am performing a search on pages that have articles component and pages that do not have articles (brought in new)
Earlier the sort was happening based on the articleDate. Now, that I have pages without articles. I have a page property called articleDate.
And I want to sort both of them combined together in Descending order.
I tried the below predicates :
predicateMap.put("9_orderby", "@jcr:content/articleDate");
predicateMap.put("9_orderby.sort", "desc");
predicateMap.put("10_orderby", "@articleDate");
predicateMap.put("10_orderby.sort", "desc");
The above code was ordering results based on page property : article Date first , followed by results that were ordered by articleDate of the article.
But I want them to be combined purely based on date.
When I tried
9_orderby = @6655266:content/articleDate, @articleDate
9_orderby.sort = desc
it is not giving me the order expected. it gives sept 9, 2021 first and then feb 3, 2024
. Can someone help me on this?