Loading TOC...

MarkLogic Server 11.0 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)], [])
  

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