假设我有 2 个文件:
<doc1>
<a>the dog</a>
<a>the cat</a>
<a>the human</a>
</doc1>
和
<doc2>
<a>the dog</a>
<a>foo</a>
<a>bar</a>
</doc2>
现在对于 Marklogic,我想在它们中搜索“the”,这样我就可以运行:
search:search(
'a:the',
<options xmlns="http://marklogic.com/appservices/search">
<constraint name="a">
<value>
<term-option>case-insensitive</term-option>
<element ns="" name="a"/>
</value>
</constraint>
</options>
)
这可行,但返回两个文档(这是我要求的)但是如果我只想要在约束上有超过 1 个匹配的结果...即。'给我有 2+ 个节点的文档,带有“the”'
我不知道从哪里开始。谢谢!