Hi how can i retrieve the URI of all the documents in directory. I create the below xquery to achieve that but that doesn't helps.
for $i in xdmp:directory("/Test/performance/results/","infinity")
let $k := document-uri(fn:doc($i))
return <li>{$k}</li>
For efficiency you should use the URI lexicon.
cts:uris((), (), cts:directory-query("/Test/performance/results/","infinity"))
See https://docs.marklogic.com/cts:uris for documentation.
How about:
xdmp:directory("/Test/performance/results/","infinity") !
<li>{fn:document-uri(.)}</li>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With