Loading TOC...

MarkLogic Server 11.0 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()
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.