Loading TOC...

MarkLogic 9 Product Documentation
admin.segmentAssignmentPolicy

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

Summary

This function returns an element that represents the segment assignment policy. Use the admin:database-set-assignment-policy 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.segmentAssignmentPolicy();

admin.databaseSetAssignmentPolicy(config, 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.
   

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