Loading TOC...


   $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

schema-database-id The schema database used by the content database holding the query partition.
partition-number The number of the query partition.
safe-to-exclude Set to fn:true() to enable exclusion or fn:false() (the default) to disable.

Usage Notes

The query partition must have a query set (for example, by 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";


(: Enables safe-to-exclude on Query Partition 3 in the Schemas database. :)

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