Sorting Issue of the LSCS Query Result
Hi all,
Currently i am using LSCS query for query xml content for building up a site.
however have difficulties on how to sort the result by the data of the content (say i want to sort by onlineDate, which stored as metadata of the content. e.g. Teamsite/Metadata/onlineDate)
May i ask if there are config/query parameter which enable custom sorting of content?
Thanks
Comments
-
You need to specify what version of LSCS you are using.
Reading the LS Technical Reference Manual (16.6.1) there is a sort parameter on the query string:
A comma-separated list of fields by which to
sort the results.
• To sort date and numeric fields in ascending order, prefix the field name with the plus (+) character. Note that the + character must be percent-encoded as %2B when included in the URL.
• To sort these fields in descending order, prefix the field name with the minus (-) character.
By default, the fields will be sorted in alphabetical orderExample:
http://host:port/context/v1/document$title,summary?q=category:article&sort=-publishDate0
Categories
- All Categories
- 111 Developer Announcements
- 49 Articles
- 103 General Questions
- 123 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 123 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 1 XM Fax
- Docker Automation
- LiveSite Content Services (LSCS) REST API
- Single Page Application (SPA) Modules
- TeamSite Add-ons
If you are interested in gaining full access to the content, you can register for a My Support account here.