MarkLogic 12 EA 1 Product Documentation
cts:index-order

cts:index-order(
   $index as cts:reference,
   [$options as xs:string*]
) as cts:order

Summary

Creates a index-based ordering clause, for use as an option to cts:search.

Parameters
index A reference to a range index.
options Options. The default is ().

Options include:

"descending"
Results should be returned in descending order of index.
"ascending"
Results should be returned in ascending order of index.

Usage Notes

Only one of "ascending" or "descending" may be specified in the options parameter. If neither "ascending" nor "descending" is specified, then the default is "ascending".

Example

cts:index-order(cts:element-reference(xs:QName("TITLE")))

(: returns the following:
cts:index-order(cts:element-reference(fn:QName("","TITLE"),
  ("type=string","collation=http://marklogic.com/collation/")), "ascending")
:)
Powered by MarkLogic Server | Terms of Use | Privacy Policy