Loading TOC...

MarkLogic Server 11.0 Product Documentation
flexrep.configureDatabase

flexrep.configureDatabase(
   config as element(configuration),
   dbid as (Number|String)
) as element(configuration)

Summary

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.

Example

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.
   

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