MarkLogic 9 Product Documentation
info:policy-set

info:policy-set(
   [$policy-name as xs:string?],
   [$policy as element(info:options)?]
) as empty-sequence()

Summary

[DEPRECATED] This function sets an ingestion policy, which consists of a reusable <options> node defining parameters for content loading and transformation.

Parameters
policy-name The name of this ingestion policy. If the policy already exists, it is overwritten without warning. If no name or the empty string is provided, the new policy replaces the default policy (named 'default').
policy An options node. If provided, it will be merged with a set of global reasonable defaults and stored as the named policy. If no $policy is provided, the content is the set of global defaults.

Example

  xquery version "1.0-ml"; 

  import module namespace info = "http://marklogic.com/appservices/infostudio"  
      at "/MarkLogic/appservices/infostudio/info.xqy";

  info:policy-set(
    "default",
    <options name="default" xmlns="http://marklogic.com/appservices/infostudio">
      <collection>http://marklogic.com/appservices/infostudio</collection>
      <error-handling>continue-with-warning</error-handling>
      <fab-retention-duration>P30D</fab-retention-duration>
      <file-filter>^[^\.]</file-filter>
      <max-docs-per-transaction>100</max-docs-per-transaction>
      <overwrite>overwrite</overwrite>
      <ticket-retention-duration>P30D</ticket-retention-duration>
      <uri>
        <literal>http://docs/mydocs</literal>
        <filename/>
        <literal>.</literal>
        <ext/>
      </uri>
    </options>)

  (: Defines and sets a default polcy to load all documents with the uri of 
     http://docs/mydocs. :)
     
Powered by MarkLogic Server | Terms of Use | Privacy Policy