I am using angular and nodeJS with a search control and ML search connector to MarkLogic APIs. I need to insert the return-plan to the request but am unclear how to make that happen. In the mlSearch function, it suggest that I can add other context arguments. Here is the code:
function SearchCtrl($scope, $location, userService, searchFactory, injectMlRest,
$mdDialog, $http, searchUtil, searchMethods, searchCommon,
loginService, htmlEntity) {
let ctrl = this;
// use for changing query options e.g "ctrl.ctx.options.queryOptions = 'ucsf'"
ctrl.ctx = searchFactory.newContext();
ctrl.mlRest = injectMlRest;
ctrl.http = $http;
ctrl.htmlEntityEncode = htmlEntity.encode;
I think that I need to add a ctrl.ctx.options return-plan to the existing options, but don't know how to do that.