Hi Florent,

Hidden metadata is part of the document fragment, but not part of ‘full-text’. 
If you want to do things with it, you need to add a metadata-field for each of 
them, and then you can also use a field-range index for range queries on them.

So yeah, it is a bit like a non-intrusive envelope (it works on binaries too), 
not requiring a separate fragment (like doc properties)..

Cheers

From: 
<[email protected]<mailto:[email protected]>>
 on behalf of Florent Georges <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Thursday, December 7, 2017 at 2:38 PM
To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Subject: Re: [MarkLogic Dev General] How to query metadata

Hi Erik,

Sorry, I don't have access to this email box from my client's, so it's not easy 
to follow discussions here.  But I saw your response and it was indeed the 
solution.

It seems I missed the point of the new metadata then, since I thought it was a 
way to attach indexed values to a document.

Ot is it more like a non-intrusive envelope pattern (it does not modify the 
content itself), not requiring new fragments (like doc properties), but having 
to be indexed one by one explicitly?

Anyway, thank you for your answer!

Regards,

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


On 4 December 2017 at 19:01, Erik Hennum wrote:
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]<mailto:[email protected]>
 
<[email protected]<mailto:[email protected]>>
 on behalf of Florent Georges <[email protected]<mailto:[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
http://fgeorges.org/
http://h2o.consulting/ - New website!



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





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

Reply via email to