在此链接http://docs.marklogic.com/guide/rest-dev/appendixb#id_18313中,它表示要从MarkLogic检索多个文档,我们可以将Accept指定为application/xml
,并使用extract-document-data从MarkLogic检索相应的字段。当我尝试以下操作时,它会出现以下错误,但是对于相同的操作,如果我将Accept type设置为multipart/mixed
,那么它将获取所有文档,其URI由BOUNDARY
分隔。我想知道我是否可以在搜索结果摘要中获取提取的内容?
" errorResponse":{" statusCode":500," status":"内部服务器错误", " messageCode":" INTERNAL ERROR"," message":" XDMP-AS :(错误:XPTY0004) searchmodq:resolve($ structured-query,$ options,$ params) - 无效 胁迫:(
REST API操作: http://localhost:8000/LATEST/search?q=dog
查询选项:
<?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>
答案 0 :(得分:1)
这是一个错误。有关替代解决方案,请参阅
上的评论How to transform multiple documents into a single document using MarkLogic's REST API?