Hi, Sini:

The term "metadata" may have created an unhelpful expectation.

In the Search API, metadata extraction gets nodes from the content of the 
result document other than the nodes matched by the query criteria.  It's 
called "metadata" because it's often general information such as the identifier 
or title.

Thus, when extracting metadata, the query options can specify only a XML 
element or attribute, JSON key, or field (whether directly or indirectly by 
reference to a constraint).  A collection does not appear in the content of a 
document, so the query options can't extract a collection as metadata.

Also, a collection is just a tag associated with one or more documents.  A 
collection has no metadata to extract.

Can you expand a bit about the goal here?


Erik Hennum

________________________________
From: [email protected] 
[[email protected]] on behalf of sini narayanan 
[[email protected]]
Sent: Wednesday, June 26, 2013 3:11 AM
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Maklogic : get collection Search Metadata

Hi All,

I'm performing a search:resolve operation on a query with options which include 
a collection constraint as below.

<search:constraint name="provider">
    <search:collection prefix="/provider/" facet="true">
      <search:facet-option>frequency-order</search:facet-option>
      <search:facet-option>limit=10</search:facet-option>
    </search:collection>
    <search:annotation><proj:front-page 
xmlns:proj="http://marklogic.com/appservices/project"/><proj:side-bar 
xmlns:proj="http://marklogic.com/appservices/project";>true</proj:side-bar></search:annotation>
</search:constraint>


How do I get the search:metadata for the collection "provider"?
I have included the below node in the options.
<search:extract-metadata>
  <search:constraint-value ref="provider"/>
</search:extract-metadata>

I get the result with all the collection details that exist for the search doc.

Thanks,
Sini
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to