Loading TOC...

MarkLogic 12 EA 2 Product Documentation
admin.databaseForeignReplicaGetClusterId

admin.databaseForeignReplicaGetClusterId(
   foreign-replica as element(db.foreignReplica)
) as (Number|String)

Summary

This function returns the id of the replica cluster from the replica database configuration.

Parameters
foreign-replica The foreign replica configuration element.

Example


  let admin = require("/MarkLogic/admin.xqy")
  let cfg = admin.getConfiguration()
  let freplica = admin.databaseGetForeignReplicas(cfg, xdmp.database("Documents"))
  admin.databaseForeignReplicaGetClusterId(fn.head(freplica))

    

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