
flexrep.databaseNeedsConfiguration( config as element(configuration), dbid as (Number|String) ) as 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.
const flexrep = require('/MarkLogic/flexrep');
const admin = require('/MarkLogic/admin');
flexrep.databaseNeedsConfiguration(
admin.getConfiguration(), xdmp.database('Documents'));