Skip to content

Instantly share code, notes, and snippets.

@ableasdale
Created May 9, 2018 11:31
Show Gist options
  • Save ableasdale/1262ecc23862ef601872451cc5f6bec0 to your computer and use it in GitHub Desktop.
Save ableasdale/1262ecc23862ef601872451cc5f6bec0 to your computer and use it in GitHub Desktop.
MarkLogic: list all collections for a given database along with a count of documents held in that collection
cts:collections() ! element collection-name {attribute count {xdmp:estimate(cts:search(doc(), cts:collection-query(.)))}, .}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment