ElasticSearch缺少文档异常

时间:2016-12-01 17:38:00

标签: java elasticsearch

文档在我的ElasticSearch中编入索引但在弹性搜索中更新时文档源缺少异常

GET /ps_topcat_24/products/_search
{
 "query":{
     "match": {
        "_id": "957680208f55e89f407c6a479c9f3c9d"
     }
 },
 "fields":["price"]
}

ES的回应:

{
"took": 2,
"timed_out": false,
"_shards": {
  "total": 6,
  "successful": 6,
  "failed": 0
},
"hits": {
  "total": 1,
  "max_score": 1,
  "hits": [
     {
        "_index": "ps_topcat_24",
        "_type": "products",
        "_id": "957680208f55e89f407c6a479c9f3c9d",
        "_score": 1,
        "fields": {
           "price": [
              28.99
           ]
        }
     }
   ]
}
}

清楚地显示该文件存在。

但更新不起作用

  POST/ps_topcat_24/products/957680208f55e89f407c6a479c9f3c9d/_update
{
"doc":{
  "matching_id":"test-sourabh"
   }
}

它给出了

{
 "error": {
   "root_cause": [
      {
         "type": "document_source_missing_exception",
         "reason": "[products][957680208f55e89f407c6a479c9f3c9d]: document source missing",
         "shard": "2",
         "index": "ps_topcat_24"
      }
   ],
   "type": "document_source_missing_exception",
   "reason": "[products][957680208f55e89f407c6a479c9f3c9d]: document source missing",
   "shard": "2",
   "index": "ps_topcat_24"
  },
  "status": 400
}

有什么建议吗?

0 个答案:

没有答案