anchor.diff:  First, let's index a simple doc:
   
   [source,console]
  ---------------------------------------------------
  +----
   PUT test/_doc/1
   {
     "counter" : 1,
     "tags" : ["red"]
   }
  ---------------------------------------------------
  +----
  +// TESTSETUP
   
   To increment the counter, you can submit an update request with the
   following script:
   
   [source,console]
  ---------------------------------------------------
  +----
   POST test/_update/1
   {
     "script" : {
  
positive.code:    },
     "_index": "test",
     "_id": "1",
     "_version": 7,
     "_primary_term": 1,
     "_seq_no": 6,
     "result": "noop"
  }
  --------------------------------------------------
  
  You can disable this behavior by setting `"detect_noop": false`:
  
  [source,console]
  --------------------------------------------------
  POST test/_update/1
  {
    "doc": {
  
negative.code:     }
    }
  }
  ----
  
  You can also add and remove fields from a document. For example, this script
  adds the field `new_field`:
  
  [source,console]
  ----
  POST test/_update/1
  {
    "script" : "ctx._source.new_field = 'value_of_new_field'"
  }
  ----
  
  Conversely, this script removes the field `new_field`:
  
  [source,console]
  ----
  POST test/_update/1
  {
    "script" : "ctx._source.remove('new_field')"
  }
  ----
  // TEST[continued]
  
  The following script removes a subfield from an object field:
  
  ////
  [source,console]
  ----
  PUT test/_doc/1?refresh
  {
    "my-object": {
      "my-subfield": true
    }
  }
  ----
  ////
  
  [source,console]
  ----
  POST test/_update/1
  {
    "script": "ctx._source['my-object'].remove('my-subfield')"
  }
  ----
  // TEST[continued]
  
  Instead of updating the document, you can also change the operation that is
  