op:prepare( $plan as map:map, $optimize as xs:unsignedShort ) as map:map
This method prepares the specified plan for execution as an optional final step before execution.
import module namespace op="http://marklogic.com/optic" at "/MarkLogic/optic.xqy"; let $employees := op:from-view("main", "employees") return $employees => op:select(()) => op:prepare(2) => op:result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.