MarkLogic 10 Product Documentation
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

  const 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"))

  
Powered by MarkLogic Server | Terms of Use | Privacy Policy