tieredstorage:partition-set-exclusion-enabled

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()

Summary

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

Parameters
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.

Example


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. :)
 
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy