MarkLogic 9 Product Documentation
PreparePlan functions (PreparePlan Object)

The following prototype methods are not operators for constructing the plan but, instead, process the plan in some way. These prototype methods can be used in conjuction with the Plan Processor Functions.

5 functions
Function name Description
PreparePlan.prototype.explain This method returns a representation of the builtin execution plan.
PreparePlan.prototype.export This method generates a serialized representation of the Optic query to JSON so that it can be persisted as a file or used as a REST payload.
PreparePlan.prototype.map This method applies the specified function to each row returned by the plan to produce a different result row.
PreparePlan.prototype.reduce This method applies a function or the builtin reducer to each row returned by the plan to produce a single result as with the reduce() method of JavaScript Array.
PreparePlan.prototype.result This method executes the plan (mapping or reducing, if specified) to generate the result, which is a plan, document plan, prepared plan, or map or reduce result plan.
Powered by MarkLogic Server | Terms of Use | Privacy Policy