MarkLogic 10 Product Documentation
flexrep:database-needs-configuration

flexrep:database-needs-configuration(
   $config as element(configuration),
   $dbid as xs:unsignedLong
) as xs:boolean

Summary

This function checks the configuration of a database to see if it has all of the necessary indexes for Flexible Replication to work at its best. Returns true if the database needs configuration changes, and returns false if the configuration is as-expected.

Parameters
config A configuration specification, typically a call to admin:get-configuration.
dbid The database ID of the database to check.

Usage Notes

Note that this function will return true when run against a database that does not have Flexible Replication configured.

Example

xquery version "1.0-ml"; 
 
import module namespace flexrep = 
      "http://marklogic.com/xdmp/flexible-replication"  
      at "/MarkLogic/flexrep.xqy";
import module namespace admin = "http://marklogic.com/xdmp/admin" 
      at "/MarkLogic/admin.xqy";

flexrep:database-needs-configuration(
  admin:get-configuration(), xdmp:database("Documents") )

  => true
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy