Loading TOC...

MarkLogic 12 EA 1 Product Documentation
AccessPlan.prototype.sampleBy

AccessPlan.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()
  

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