如何在marklogic的目录中列出所有文档的所有URI [英] How to list all the URI of all documents in a directory in marklogic

查看:51
本文介绍了如何在marklogic的目录中列出所有文档的所有URI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何检索目录中所有文档的URI.我创建了下面的xquery来实现这一点,但这无济于事.

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>

推荐答案

为了提高效率,您应该使用URI词典.

For efficiency you should use the URI lexicon.

cts:uris((), (), cts:directory-query("/Test/performance/results/","infinity"))

有关文档.请参见 https://docs.marklogic.com/cts:uris .

这篇关于如何在marklogic的目录中列出所有文档的所有URI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆