<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/cts.documentFragmentQuery.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>cts.documentFragmentQuery</api:function-name><api:suggest>cts.documentfragmentquery</api:suggest><api:suggest>cts</api:suggest><api:suggest>documentfragmentquery</api:suggest><api:function-link mode="xquery" fullname="cts:document-fragment-query">/apidoc/8.0/cts:document-fragment-query.xml</api:function-link><api:function mode="javascript" name="documentFragmentQuery" 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.documentFragmentQuery"><api:summary>
  Returns a query that matches all documents where <code xmlns="http://www.w3.org/1999/xhtml">$query</code> matches
  any document fragment.  When searching documents, document-properties, or
  document-locks, <code xmlns="http://www.w3.org/1999/xhtml">cts:document-fragment-query</code> provides a
  convenient way to additionally constrain the search against any document
  fragment.
</api:summary><api:params><api:param name="query" type="cts:query"><api:param-description>
    A query to be matched against any document fragment.
  </api:param-description><api:param-name>query</api:param-name><api:param-type>cts.query</api:param-type></api:param></api:params><api:return>cts.documentFragmentQuery</api:return><api:usage>
<p xmlns="http://www.w3.org/1999/xhtml">A query that uses <code>cts:document-fragment-query</code> allows you
to cross fragment boundaries in a  <code>cts:and-query</code>, as shown in the
second example below.
</p>
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
cts:search(
  cts.documentFragmentQuery(
    cts.wordQuery("hello")));

=&gt;  All documents that contain the word "hello".
</pre></api:example></api:function></api:function-page>