MarkLogic 12 EA 1 Product Documentation
admin.statisticalAssignmentPolicy

admin.statisticalAssignmentPolicy() as element(db.assignmentPolicy)

Summary

This function returns an element that represents the statistical assignment policy. Use the admin.databaseSetAssignmentPolicy function to set the assignment policy.

Example


const admin = require('/MarkLogic/admin');

const config = admin.getConfiguration();
const dbId = admin.databaseGetId(config, 'db1');
const policy = admin.statisticalAssignmentPolicy();

const setLock = admin.databaseSetLocking(config, dbid, 'strict');

admin.databaseSetAssignmentPolicy(setLock, dbId, policy);

// Returns the new configuration element -- use admin.saveConfiguration
// 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