MarkLogic Server 11.0 Product Documentation
cts.directoryQuery

cts.directoryQuery(
   uris as String[],
   [depth as String?]
) as cts.directoryQuery

Summary

Returns a query matching documents in the directories with the given URIs.

Parameters
uris One or more directory URIs.
depth "1" for immediate children, "infinity" for all. If not supplied, depth is "1".

Usage Notes

The directory URI should always have a trailing slash.

Example

cts.search(cts.andQuery(["repair",
  cts.directoryQuery(["/reports/", "/analysis/"], "1")]))

  => .. relevance ordered sequence of documents that both
     contains the word "repair" and is in either the
     directory "/reports/" or in the directory "/analysis/".
Powered by MarkLogic Server | Terms of Use | Privacy Policy