op.import

op.import(
   exportedPlan as String
) as Plan

Summary

This function instantiates a plan from the JSON representation of a plan that was exported by the prototype.export function.

For more information, see Exporting and Importing a Serialized Optic Query in the Application Developer's Guide

Parameters
exportedPlan The plan to be imported. This is generated by the prototype.export function.

Example

const op = require('/MarkLogic/optic');

op.import(cts.doc('plan.json').toObject()).result();
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy