admin.forestSetPartitionNumber( config as element(configuration), forest-id as (Number|String), value as Number? ) as element(configuration)
This function sets the partition number for the specified forest.
const admin = require('/MarkLogic/admin.xqy'); var config = admin.getConfiguration() var forestid = admin.forestGetId(config, "myForest") var config = admin.forestSetPartitionNumber(config, forestid, 2) admin.saveConfiguration(config)