tieredstorage:partition-set-exclusion-enabled( $schema-database-id as xs:unsignedLong, $partition-number as xs:unsignedInt, $safe-to-exclude as xs:boolean ) as empty-sequence()
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.
xquery version "1.0-ml"; import module namespace tieredstorage = "http://marklogic.com/xdmp/tieredstorage" at "/MarkLogic/tieredstorage.xqy"; ts:partition-set-exclusion-enabled( xdmp:database("Schemas"), 3, fn:true() ) (: Enables safe-to-exclude on Query Partition 3 in the Schemas database. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.