Loading TOC...

MarkLogic Server 11.0 Product Documentation
alert:make-config

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

Summary

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.

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

Example

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

  alert:make-config(
	 "http://acme.com/alert/message-board",
        "Message Board",
        "Alerting config for messages on the message board",
        <alert:options/>
    )
    

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