REST Error during extract document data : Marklogic

145 views Asked by At

In this link http://docs.marklogic.com/guide/rest-dev/appendixb#id_18313 it says to retrieve multiple documents from MarkLogic we can specify Accept as application/xml and use extract-document-data to retrieve respective fields from MarkLogic. When I try the below operation it gives the following error, but for the same operation if I set Accept type as multipart/mixed then it fetches all documents with URI separated by BOUNDARY. I wanted to know whether I can get extracted content inside the search result summary ?

"errorResponse":{"statusCode":500, "status":"Internal Server Error", "messageCode":"INTERNAL ERROR", "message":"XDMP-AS: (err:XPTY0004) searchmodq:resolve($structured-query, $options, $params) -- Invalid coercion: (

REST API Operation : http://localhost:8000/LATEST/search?q=dog

Query Options :

<?xml version="1.0" encoding="UTF-8"?>
<search:search xmlns:search="http://marklogic.com/appservices/search">
  <search:options xmlns="http://marklogic.com/appservices/search">
    <search:extract-document-data xmlns="http://schemas.com"selected="include">
      <search:extract-path>/hcp/tenantId</search:extract-path>
    </search:extract-document-data>
  </search:options>
</search:search>
1

There are 1 answers

0
ehennum On

It's a bug. For an alternative solution, please see the comment on

How to transform multiple documents into a single document using MarkLogic's REST API?