IsSorted (NotesDocumentCollection - JavaScript)

Read-only. Indicates whether the documents in a collection are sorted.

Defined in

NotesDocumentCollection

Syntax

isSorted() : boolean
Legal value Description
true if the collection is sorted
false if the collection is not sorted

Usage

A collection is sorted only when it results from a full-text search.

When a collection is sorted, the documents are sorted by relevance score with the most relevant document appearing first. A relevance score is a number assigned to each document that matches a particular full-text search query. The number is related to the number of matches that were found in the document.

Examples

A button processing a document collection assigns the NotesDocumentCollection object to a global variable. This computed field queries the global variable and displays whether the collection is sorted.
var dc:NotesDocumentCollection = requestScope.dc;
if (dc != null) {
	return dc.isSorted() ? "Sorted collection" : "Unsorted collection";
}