elasticsearch-definitive-guide-cn icon indicating copy to clipboard operation
elasticsearch-definitive-guide-cn copied to clipboard

关于_mget

Open sivanbil opened this issue 9 years ago • 1 comments
trafficstars

看翻译的


GET /_mget  # 此处是GET,但是在测试的时候,发现GET会报错
{
   "docs" : [
      {
         "_index" : "website",
         "_type" :  "blog",
         "_id" :    2
      },
      {
         "_index" : "website",
         "_type" :  "pageviews",
         "_id" :    1,
         "_source": "views"
      }
   ]
}




按照上面的报错



{
"error": {
"root_cause": [
{
"type": "parse_exception",
"reason": "Failed to derive xcontent"
}
],
"type": "parse_exception",
"reason": "Failed to derive xcontent"
},
"status": 400
}

把GET =》 POST



{
"docs": [
{
"_index": "website",
"_type": "blog",
"_id": "2",
"_version": 4,
"found": true,
"_source": {
"title": "xwl11111",
"text": "2015-0919",
"views": 0,
"tags": [
"testing"
],
"view": 5
}
}
]
}

sivanbil avatar Dec 08 '15 10:12 sivanbil

可能是版本更新后的问题

looly avatar Dec 09 '15 04:12 looly