如何在marklogic中搜索与模式匹配的URI列表?

Ziv*_*ane 3 xquery marklogic

我是XML数据库的新手,所以我需要一些关于marklogic和xquery的帮助.

我确实在数据库中记录了一些文档,当我按下探索按钮时,它们的URI显示出来并且看起来像(例如):

/firstDirectory/documentA.xml

/firstDirectory/documentB.xml

/secondDirectory/documentC.xml

现在我想获取位于'firstDirectory'中的所有文档的URI列表.所以我需要这样的东西:

List<URI> unknownXQueryFunction("/firstDirectory/");

可悲的是,在观看MarkLogic API时,我无法找到我需要的功能.我用collection/document/document-uri/base-uri /目录尝试了一些东西,但没有一个做的伎俩:(

任何帮助将不胜感激.

wst*_*wst 5

这将目录查询应用于cts:uris,这应该是比cts:uri-match更准确的方法,具体取决于目录的组织方式:

cts:uris((),'document' cts:directory-query('/firstDirectory/','infinity'))
Run Code Online (Sandbox Code Playgroud)