I want to search document properties of the documents. I have only documents loaded in Marklogic and no xml files is there. I have turned off content processing. Now I want to search for a metadata (present in xdmp:document-properties(uri)
)
I have the following properties in a document:-
<?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>
Now I want to search for Author only not other properties. If I am using search:search("Administrator")
then it is looking for this word in the entire document. But, I want to search only for the Author tag in document properties. Similarly I want to search in other properties also.
I have also tried this:-
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
But, this does not work. Please help.