admin.forestForeignMasterGetForestId( foreign-master as element(as.foreignMaster) ) as (Number|String)
This function returns the id for the forest from the foreign master forest configuration element.
let admin = require("/MarkLogic/admin.xqy") let cfg = admin.getConfiguration() let fmforest = admin.forestGetForeignMaster(cfg, xdmp.forest("Documents")) admin.forestForeignMasterGetForestId(fn.head(fmforest))
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.