Skip to main content
Skip table of contents

UC Sort Search Results [C IG]

Motivation

When searching for items or collections, we want to get the results sorted based on different criteria for the metadata fields. This can be done by adding the sort element to our search document

Example

Doing a search for items

PUT /item

We can in our search document specify which fields we want the result to be sorted on

CODE
<ItemSearchDocument xmlns="http://xml.vidispine.com/schema/vidispine">
   <sort>
      <field>durationSeconds</field>
      <order>descending</order>
   </sort>
   <sort>
      <field>originalFormat</field>
      <order>ascending</order>
   </sort>
</ItemSearchDocument>

Results will be sorted in the order that they are given so in this case we first sort on the field durationSeconds in descending order and then on originalFormat in ascending order.

By setting the element caseSensitiveSorting to false for a metadata-field the values of that field can be sorted in a case-insensitive order.

Resources

How to

https://apidoc.vidispine.com/latest/item/search.html?#sorting

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.