Loading TOC...

cts:document-query

cts:document-query(
   $uris as xs:string*
) as cts:document-query

Summary

Returns a query matching documents with the given URIs. It will match both documents and properties documents with the given URIs.

Parameters
$uris One or more document URIs.

Example

  cts:search(//function,
    cts:document-query("/reports.xml"))

  => .. relevance-ordered sequence of 'function' elements
  in the document "/reports.xml".

Example

cts:search(//function, cts:and-query(("repair",
  cts:document-query(("/reports.xml", "/analysis.xml")))))

  => .. relevance ordered sequence of 'function' elements in
     any document that both contains the word "repair" and is
     in either the document "/reports.xml" or in the document
     "/analysis.xml".

Comments

  • <code>cts:document-query()</code> is handy for doing query-time joins. Run a query to find some document URIs, likely with <a href="http://docs.marklogic.com/cts:uris"><code>cts:uris()</code></a>, using the URI lexicon. Feed the results (a sequence of URIs) as the first parameter of <code>cts:document-query()</code>.
Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy