Loading TOC...

cts:or-query

cts:or-query(
   $queries as cts:query*
) as cts:or-query

Summary

Returns a query specifying the union of the matches specified by the sub-queries.

Parameters
$queries A sequence of sub-queries.

Example

  cts:search(//PLAY,
    cts:or-query((
      cts:word-query("summer"),
      cts:word-query("sun of York"))))
  => .. a sequence of 'PLAY' elements which are
  ancestors (or self) of some node whose text content
  contains the word 'summer' OR some node
  whose text content contains the phrase 'sun of York'.
  This union contains at least one 'PLAY' node with:

    PLAY/TITLE = 
      "The Tragedy of King Richard the Second",

  but also contains other 'PLAY' nodes containing some 
  text node with the word "summer", for example,

    PLAY/TITLE = "A Midsummer Night's Dream".

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