tieredstorage.partitionSetExclusionEnabled( schema-database-id as (Number|String), partition-number as Number, safe-to-exclude as Boolean ) as null
By default, when a search query is given to MarkLogic, all query partitions are searched, regardless of the query assignment policy set on the partition. This function enables you to avoid this overhead, so that the query partition will not be searched if the search query does not match the query assignment policy set for that partition.
For details, see Isolating a Query Partition in the Administrator's Guide
tieredstorage:partition-set-query
)
before enabling partition-set-safe-to-exclude. If no query is configured for the partition,
TS-NOPARTITIONQUERY is thrown.
// Enables safe-to-exclude on Query Partition 3 in the Schemas database. const ts = require('/MarkLogic/tieredstorage'); declareUpdate(); ts.partitionSetExclusionEnabled( xdmp.database('Schemas'), 3, true );