MarkLogic 12 EA 1 Product Documentation
op:sample-by

op:sample-by(
   [$options as map:map?]
) as map:map

Summary

This function samples rows from a view or from a pattern match on the triple index.

Parameters
$options Options consisting of key-value pairs that set options. At present, the options consist of limit, which can take a numeric value to specify the size of the sample. The default value is 100.

Example

xquery version "1.0-ml";

import module namespace op="http://marklogic.com/optic"
     at "/MarkLogic/optic.xqy";

op:from-view("opticUnitTest", "musician")
    => op:sample-by()
    => op:result()
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy