Loading TOC...

MarkLogic Server 11.0 Product Documentation
admin:bucket-assignment-policy

admin:bucket-assignment-policy() as element(db:assignment-policy)

Summary

This function returns an element that represents the bucket assignment policy. Use the admin:database-set-assignment-policy function to set the assignment policy.

Example


xquery version "1.0-ml";
import module namespace admin = "http://marklogic.com/xdmp/admin"
    at "/MarkLogic/admin.xqy";

let $config := admin:get-configuration()
let $dbid := admin:database-get-id($config, "db1")
let $policy := admin:bucket-assignment-policy()

return 
  admin:database-set-assignment-policy($config, $dbid, $policy)

  (: returns the new configuration element -- use admin:save-configuration
     to save the changes to the configuration or pass the configuration
     to other Admin API functions to make other changes.  :)
    

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