Created
January 7, 2013 04:44
-
-
Save ryanjdew/4472397 to your computer and use it in GitHub Desktop.
This can help you to find empty directories if the uri lexicon is enabled in MarkLogic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
let $directories-map := (cts:uris('/',('properties','map'),cts:directory-query('/','infinity')) | |
- | |
cts:uris('/',('document','map'),cts:directory-query('/','infinity'))) | |
return map:keys($directories-map)[xdmp:estimate(cts:search(fn:collection(),cts:directory-query(.,'infinity'))) eq 0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment