Hi, Florent:

Document metadata values are not indexed by default.  First, define a field for 
the metadata value that you want to search:

    http://docs.marklogic.com/guide/search-dev/query-options#id_50523


Hoping that helps,


Erik Hennum


________________________________________
From: [email protected] 
<[email protected]> on behalf of Florent Georges 
<[email protected]>
Sent: Monday, December 4, 2017 9:45:11 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] How to query metadata

Hi,

I have documents with metadata (the metadata values you can retrieve with 
xdmp:document-get-metadata()).

I would like to search documents with a metadata with a specific value, but I 
cannot find any CTS query function for that purpose.  Something like:

cts:search(/, cts:metadata('foo', 'bar'))

Have I missed something?

Regards,

--
Florent Georges
H2O Consulting
http://h2o.consulting/


_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to