Loading TOC...

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

  var 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.

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.