alert.makeConfig( uri as String, name as String, description as String, options as Object ) as Object
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.configInsert
. This URI will also be
used as a directory for all documents (config, actions,
and rules) associated with the config.
alert-admin
role is required to run
this function (or all of the privileges in the
alert-admin
role).
"unfiltered":"true"
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.findMatchingRules
). 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.
const alert = require("/MarkLogic/alert.xqy"); alert.makeConfig( "http://acme.com/alert/message-board", "Message Board", "Alerting config for messages on the message board", {"unfiltered":"true"})