flexrep:database-needs-configuration( $config as element(configuration), $dbid as xs:unsignedLong ) as xs:boolean
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. |
Note that this function will return true
when run against a
database that does not have Flexible Replication configured.
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
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.