<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/cts.orQuery.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>cts.orQuery</api:function-name><api:suggest>cts.orquery</api:suggest><api:suggest>cts</api:suggest><api:suggest>orquery</api:suggest><api:function-link mode="xquery" fullname="cts:or-query">/apidoc/8.0/cts:or-query.xml</api:function-link><api:function mode="javascript" name="orQuery" type="builtin" lib="cts" category="SearchBuiltins" subcategory="cts:query Constructors" hidden="false" bucket="MarkLogic Built-In Functions" prefix="cts" namespace="http://marklogic.com/cts" fullname="cts.orQuery"><api:summary>
  Returns a query specifying the union
  of the matches specified by the sub-queries.
</api:summary><api:params><api:param name="queries" type="cts:query*"><api:param-description>
    A sequence of sub-queries.
  </api:param-description><api:param-name>queries</api:param-name><api:param-type>cts.query[]</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
  Options to this query. The default is <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">[]</span>.
  <p xmlns="http://www.w3.org/1999/xhtml">
  Options include:
  </p>
  <blockquote xmlns="http://www.w3.org/1999/xhtml"><dl>
  <dt>"synonym"</dt>
  <dd>Specifies that all of the terms in the $queries parameter are
  considered synonyms for scoring purposes.  The result is that
  occurrences of more than one of the synonyms are scored as if
  there are more occurrences of the same term (as opposed to
  having a separate term that contributes to score). 
  </dd>
  </dl></blockquote>
  </api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param></api:params><api:return>cts.orQuery</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
cts.estimate(
    cts.orQuery([
      cts.wordQuery("summer"),
      cts.wordQuery("sun of York")]))
  =&gt; 31 plays have text content that
  contains the word 'summer' OR some node
  whose text content contains the phrase 'sun of York'.
  
</pre></api:example></api:function></api:function-page>