flexrep.configureDatabase( config as element(configuration), dbid as (Number|String) ) as element(configuration)
This function creates any indexes needed for CPF based replication. The
input configuration is returned from
admin.getConfiguration
and the configuration returned from this function must be inserted again with
admin.saveConfguration
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. |
const flexrep = require('/MarkLogic/flexrep'); const admin = require('/MarkLogic/admin'); const config = admin.getConfiguration(); const cfg = flexrep.configureDatabase( config, xdmp.database('Master')); admin.saveConfiguration(cfg); // Creates the indexes needed by the Master database for CPF based replication.