
AccessPlan.prototype.sampleBy( [options as String] ) as ModifyPlan
This function samples rows from a view or from a pattern match on the triple index.
This method can only be used directly after op.fromView , op.fromTriples or op.fromLexicons .
const op = require('/MarkLogic/optic');
op.fromView('opticUnitTest', 'musician')
.sampleBy({limit:20})
.result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.