Loading TOC...

alert.ruleSetQuery

alert.ruleSetQuery(
   rule as Object,
   query as cts.query
) as Object

Summary

Set the cts:query corresponding to the rule's query expression.

Parameters
rule The representation of a rule.
query The cts.query for documents to match on.

Example

  var alert = require("/MarkLogic/alert.xqy");

  alert.ruleSetQuery(
       alert.getAllRules("http://acme.com/alert/message-board", 
                         cts.wordQuery("dna"))[0],
       cts.wordQuery("new query for this rule"))

  

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