Loading TOC...

flexrep.databaseNeedsConfiguration

flexrep.databaseNeedsConfiguration(
   $config as element(configuration),
   $dbid as (Number|String)
) as 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

const flexrep = require('/MarkLogic/flexrep');
const admin = require('/MarkLogic/admin');

flexrep.databaseNeedsConfiguration(
  admin.getConfiguration(), xdmp.database('Documents'));
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.