我想搜索文档的文档属性。我只有加载了Marklogic的文档,没有xml文件。我已经关闭了内容处理。现在我想搜索的元数据(存在于xdmp:document-properties(uri)
)如何在文档属性中搜索?
我有一个文件中的以下属性: -
<?xml version="1.0" encoding="UTF-8"?>
<prop:properties xmlns:prop="http://marklogic.com/xdmp/property">
<uploaded>true</uploaded>
<OntologyResourceTypeValue>DOCUMENT</OntologyResourceTypeValue>
<content-type>application/pdf</content-type>
<filter-capabilities>text subfiles HD-HTML</filter-capabilities>
<CreationDate>2002/12/05 09:44:29Z</CreationDate>
<ModDate>2002/12/05 12:02:27+02'00'</ModDate>
<Producer>Acrobat Distiller 5.0 (Windows)</Producer>
<Author>Administrator</Author>
<Creator>PScript5.dll Version 5.2</Creator>
</prop:properties>
现在我要搜索作者不仅没有其他属性。如果我使用search:search("Administrator")
,那么它在整个文档中查找这个单词。但是,我只想搜索文档属性中的作者标签。同样我也想在其他属性中搜索。
我也试过这样: -
let $options := <options xmlns="http://marklogic.com/appservices/search">
<constraint name="author">
<properties name="prop:Author"/>
</constraint>
</options>
let $results := search:search("author:Administrator", $options, 1, 10)
return
$results
但是,这是行不通的。请帮忙。