Loading TOC...

MarkLogic 12 EA 1 Product Documentation
admin:database-foreign-master-get-cluster-id

admin:database-foreign-master-get-cluster-id(
   $foreign-master as element(db:foreign-master)
) as xs:unsignedLong

Summary

This function returns the id of the cluster from the specified foreign master configuration.

Parameters
foreign-master The foreign master configuration.

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $fmaster := admin:database-get-foreign-master($cfg, xdmp:database("Documents"))

  return admin:database-foreign-master-get-cluster-id($fmaster)

  (: Returns the id of the master cluster from the foreign master configuration
     element. :)
    

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