Loading TOC...


   $uri as xs:string,
   $name as xs:string,
   $description as xs:string,
   $options as element(alert:options)
) as element(alert:config)


Create an alerting configuration associated with a particular URI. The URI will be used to create a protected collection when the config is inserted into the database with alert:config-insert . This URI will also be used as a directory for all documents (config, actions, and rules) associated with the config.

uri The URI for this alerting config.
name The name for this alerting configuration.
description A description for this alerting configuration.
$options Additional options available to an alerting application for extra state.

Required Privileges

The alert-admin role is required to run this function (or all of the privileges in the alert-admin role).

Usage Notes

If you add the <alert:unfiltered>true</alert:unfiltered> option to the $options parameter, it will cause all cts:search operations that use this config to run unfiltered. This applies to the functions in the Alerting API that use cts:search (for example, alert:find-matching rules ). The default is for them to run filtered. Unfiltered searches skip the filtering stage of query processing, relying on the index resolution for the accuracy of the results. The unfiltered option can give a performance boost to configurations whose index settings do not require results to be filtered.


  xquery version "1.0-ml";
  import module namespace alert = "http://marklogic.com/xdmp/alert" 
		  at "/MarkLogic/alert.xqy";

        "Message Board",
        "Alerting config for messages on the message board",

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