MarkLogic 12 EA 1 Product Documentation
admin:query-assignment-policy

admin:query-assignment-policy(
   [$default-partition as xs:unsignedInt]
) as element(db:assignment-policy)

Summary

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

Parameters
default-partition Partition number of the default partition.

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:query-assignment-policy(1)

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.  :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy