Loading TOC...

cts.min

cts.min(
   $range-index as cts.reference,
   [$options as String[]],
   [$query as cts.query?],
   [$forest-ids as String[]]
) as xs.anyAtomicType?

Summary

Returns the minimal value given a value lexicon. This function performs the calculation in parallel in all data nodes then aggregates the values. It generally performs better than fn:min, especially on large clusters.

Parameters
$range-index Reference to a range index.
$options Same as the "options" parameter in cts:aggregate.
$query Same as the "query" parameter in cts:aggregate.
$forest-ids Same as the "forest-ids" parameter in cts:aggregate.

Example

//   This query assumes an element range index is configured
//   in the database for the 'Amount' element.

cts.min(cts.elementReference(xs.QName("Amount")))

=> 59.95000000000000125

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy