cancel
Showing results for 
Search instead for 
Did you mean: 

how to sort custom properties?

lgw6237
Champ in-the-making
Champ in-the-making
sir:
    We develop custom content type,which name is StandardDocument that includes some custom properties;Now,we hope to sort custom properties,such as standardDownloadCount,how to do with it?
my codes are:
                SearchParameters sp = new SearchParameters();

      sp.addStore(storeRef);
      sp.setLanguage(SearchService.LANGUAGE_LUCENE);
      // sp.setLimit(5);
      sp.addSort("standardDownloadCount", false);
      sp.setQuery(spath);

but this codes don't work.
1 REPLY 1

iblanco
Confirmed Champ
Confirmed Champ
never used this API, but… aren't you missing the prefix for the custom propertie ?

sp.addSort("myPrefix:standardDownloadCount", false);

Or maybe the full QName:

sp.addSort("{http://minamespace/}standardDownloadCount", false);

With the corresponding character scaping of course.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.