Loading TOC...

MarkLogic 9 Product Documentation
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();
  

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.