Loading TOC...

MarkLogic 9 Product Documentation
tieredstorage.partitionSetAvailability

tieredstorage.partitionSetAvailability(
   database-id as (Number|String),
   partition-name as String,
   value as String
) as null

Summary

This function sets the availability of the partition to either online or offline. An online partition is fully accessable through queries when its forests are attached to a database. The forests in an offline partition, as well as any replica forests, cannot be accessed.

Parameters
database-id ID of the database containing the partition.
partition-name Name of the partition.
value The availability of the partition. Values can be online or offline.

Example

// Takes the 2017-October partition in the Documents database offline.

const ts = require('/MarkLogic/tieredstorage');

declareUpdate();
ts.partitionSetAvailability(xdmp.database('Documents'), '2017-April', 'offline');
   

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