MarkLogic Server 11.0 Product Documentation
flexrep:configure-database

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

Summary

This function creates any indexes needed for CPF based replication. The input configuration is returned from admin:get-configuration and the configuration returned from this function must be inserted again with admin:save-confguration for the changes to take effect. This function may be called multiple times for the same database with no ill effect.

Parameters
config The server configuration returned from admin:get-configuration
dbid The ID of the database to configure.

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";

  let $config := admin:get-configuration()

  let $config := flexrep:configure-database(
	$config,
	xdmp:database("Master")) 

  return admin:save-configuration($config)

  (: Creates the indexes needed by the Master database for CPF based replication. :)
      
Powered by MarkLogic Server | Terms of Use | Privacy Policy