how to sort custom properties?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2010 02:52 AM
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.
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.
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2010 11:21 AM
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.
sp.addSort("myPrefix:standardDownloadCount", false);
Or maybe the full QName:
sp.addSort("{http://minamespace/}standardDownloadCount", false);
With the corresponding character scaping of course.
