anchor.diff:    }
   }
   
  -POST my-index-000001/_doc/1
  +POST my-index-000001/_doc/1?refresh
   {
     "is_published": "true" <1>
   }
  
positive.code: For example:
  
  [source,console]
  --------------------------------------------------
  PUT my-index-000001
  {
    "mappings": {
  
negative.code:     }
    }
  }
  ----
  // TEST[s/_search/_search?filter_path=hits.hits/]
  <1> Indexing a document with `"true"`, which is interpreted as `true`.
  <2> Searching for documents with a JSON `true`.
  
  ////
  [source,console-result]
  ----
  {
    "hits": {
      "hits": [
        {
          "_id": "1",
          "_index": "my-index-000001",
          "_score": "$body.hits.hits.0._score",
          "_source": {
            "is_published": "true"
          }
        }
      ]
    }
  }
  ----
  ////
  
  Aggregations like the <<search-aggregations-bucket-terms-aggregation,`terms`
  aggregation>>  use `1` and `0` for the `key`, and the strings `"true"` and
  `"false"` for the `key_as_string`. Boolean fields when used in scripts,
  return `true` and `false`:
  
  [source,console]
  ----
  POST my-index-000001/_doc/1?refresh
  {
    "is_published": true
  }
  
  POST my-index-000001/_doc/2?refresh
  {
    "is_published": false
  }
  