cancel
Showing results for 
Search instead for 
Did you mean: 

Sorted search

lbm
Champ in-the-making
Champ in-the-making
Hi,

I'd like to have my results sorted by date. But I'm using Alfresco Enterprise 2.1 and the instruction search.luceneSearch(string query, string sortColumn, boolean asc) doesn't work. It's really important to have my results ordered by date, is there any other way to get them sorted?

Thank you.
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
You can use this method on a Freemarker template too:


companyhome.childrenByLuceneSearch[query]?sort_by(["properties","cm:created"])?reverse
Every time you would like to use a property of the content model, you must specify the property and the content model tag with his own prefix Smiley Wink

Hope this helps.