Help > Web Development > Object Reference > Object Reference > ISYSSearch > Sort Property
<a name="kanchor541"></a>ISYSSearch:Sort Property
Indicates the sorting to apply the result list. Sorting has been extended in ISYS:web.dk (admin) to handle metadata and nesting sorting.

Syntax
[VBScript]
 property ISYSSearch.Sort as variant
[C#]
System.Object ISYSSearch.Sort {get;put;}
[ColdFusion/Java]
System.Object ISYSSearch.Sort() throws ComException;
void ISYSSearch.set_Sort( System.Object value );
Parameters
returns
1isysSortDefault
2isysSortNumHits
3isysSortDocSize
4isysSortFilePath
5isysSortFileType
6isysSortFileName
7isysSortDateTime
8isysSortRelevance
9isysSortDocDate
10isysSortBytes
11isysSortIndexed
12isysSortTitle
13isysSortUnphrasedHits
14isysSortFormat
64isysSortCategory

Examples
[VBScript]
<% ' This sample demostrates creating a new ISYSSearch object and specifying the ' QueryText, QuerySource and QueryType and executing it to get the result list. ' Create the new ISYSSearch object dim ISYSSearch : set ISYSSearch = ISYSEngine.NewSearch ' Specify the Index to Search ISYSSearch.QuerySource = "c:\indexes\documents" ' Specify the Query Text ISYSSearch.QueryText = "Policies" ' Specify the Query Type ISYSSearch.QueryType = isysQueryISYS ' Specify the Sort ISYSSearch.Sort = isysSortRelevance ' Execute the Search dim SearchResults : set SearchResults = ISYSSearch.Execute %>

Remarks
Sorting can be as simple as a single level sort, such as relevance or date, or extended to sort by metadata or category.

To add a simple sort:
ISYSSearch.Sort = isysSortRelevance

To add a metadata sort (on author):
ISYSSearch.Sort = "META_AUTHOR"

To sort on category, than by relevance:
ISYSSearch.Sort = Array(isysSortRelevance, isysSortCategory)