MarkLogic 10 Product Documentation
alert.ruleGetQuery

alert.ruleGetQuery(
   rule as Object
) as cts.query

Summary

Get the cts.query corresponding to the rule's query expression.

Parameters
rule The representation of a rule.

Example

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

  alert.ruleGetQuery(
       alert.getAllRules("http://acme.com/alert/message-board", 
                         cts.wordQuery("dna"))[0])

  => cts.orQuery([cts.wordQuery("dna", ["lang=en"], 1), cts.wordQuery("rna", ["lang=en"], 1)], [])
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy