AnsweredAssumed Answered

Alfresco CMIS search

Question asked by vbr on Nov 17, 2015
Latest reply on Sep 21, 2016 by jpotts
Hi,

I'm using in Java the SearchService to search custom folder on the repository using the CMIS Query language and transactional metadata to Query directly on the database.

To archieve this, I'm using the SearchParam like this :


String cmisQuery = "SELECT * FROM " + WvnEdmsModel.QNAME_TYPE_DOSSIER.toPrefixString() + " WHERE " + WvnEdmsModel.QNAME_PROP_E_SPACE_ID.toPrefixString() + " = '" + eSpaceId + "'";

SearchParameters searchParam = new SearchParameters();
searchParam.setLanguage(SearchService.LANGUAGE_CMIS_ALFRESCO);
searchParam.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
searchParam.setQuery(cmisQuery);
searchParam.setQueryConsistency(QueryConsistency.TRANSACTIONAL);
searchParam.addSort("@wvnEdms:currentStatus", true);


However, I don't know why but the results are not ordered…

I tried to add 'order by wvnEdms:currentStatus' to my Query. It works only for String, Integer and DateTime (see here http://docs.alfresco.com/4.2/concepts/intrans-metadata-query.html)


Have you an idea what I'm making wrong with searchParam.addSort ?


Thank you

Outcomes