Decode update _doc response

Updating a document using following query. Document gets updated successfully but I would like to know what are the various fields in response represents ?

Query:

POST test-square/test-square/bz773WoBVFIuuuSKDD_Q/_update
{
  "doc": { 
    "user" : "kimchy-df",
    "post_date" : "2009-11-15T14:12:12",
    "message" : "trying out Elasticsearch"
  }
}

Response:

{
  "_index": "test-square",
  "_type": "test-square",
  "_id": "bz773WoBVFIuuuSKDD_Q",
  "_version": 2,
  "result": "updated",
  "_shards": {
    "total": 2,
    "successful": 2,
    "failed": 0
  },
  "_seq_no": 1,
  "_primary_term": 1
}

successful = 2 ????

Why is successful = 2 when a single document is updated ?

Not sure but here's a guess. You have 1 primary and 1 replica?

Ohk.. Yeah that is the case.

Thanks !!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.