MarkLogic Server 11.0 Product Documentation
admin.databaseIsForestEmployed

admin.databaseIsForestEmployed(
   config as element(configuration),
   database-id as (Number|String),
   forest-id as (Number|String)
) as Boolean

Summary

This function returns true if the specified forest is employed and false the specified forest is not employed.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID of the database.
forest-id The ID of the forest.

Example

  
  const admin = require('/MarkLogic/admin.xqy');
  const config = admin.getConfiguration()
  const dbid = admin.databaseGetId(config, "myDatabase")
  const forestid = admin.forestGetId(config, "myForest")
  admin.databaseIsForestEmployed(config, dbid, forestid)

   //returns true if the specificed forest is employed and
   //false if it is not employed. 
     
Powered by MarkLogic Server | Terms of Use | Privacy Policy