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

=&gt;  All documents that have locks containg the word 12345.
</pre></api:example></api:function></api:function-page>