MarkLogic Server 11.0 Product Documentation
AccessPlan.prototype.sampleByAccessPlan.prototype.sampleBy(
[options as String]
) as ModifyPlan
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.
|
Usage Notes
This method can only be used directly after
op.fromView
,
op.fromTriples
or
op.fromLexicons
.
Example
const op = require('/MarkLogic/optic');
op.fromView('opticUnitTest', 'musician')
.sampleBy({limit:20})
.result()
Copyright © 2024 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.