
op.import( exportedPlan as String ) as Plan
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. |
const op = require('/MarkLogic/optic');
op.import(cts.doc('plan.json').toObject()).result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.