cancel
Showing results for 
Search instead for 
Did you mean: 

sorting the search result not working

sselvaraj10
Champ in-the-making
Champ in-the-making
I need to search the documents based on a property in custom aspect, sorted by date parameter:


SearchParameters parameters = new SearchParameters();
parameters.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
parameters.setLanguage(SearchService.LANGUAGE_LUCENE);
parameters.setQuery(query);
QName  recivedDate = QName.createQName(CustomMailContentModel.NAMESPACE_MAIL_MODEL_URI, CustomMailContentModel.PROP_MAIL_RECEIVED_DATE);
parameters.addSort(recivedDate, false);
// execute query
ResultSet resultSet = searchService.query(parameters);

While sorting, Alfresco always sorts using Last Accessed Time. The API call parameters.addSort(recivedDate, false) does not seem to have any impact on the result.
1 REPLY 1

subwiz
Champ in-the-making
Champ in-the-making