anchor.diff:      }
     }
   }
  ---------------------------------------------------
  -
  +----
  +// 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 `1` and `0`:
  +return `true` and `false`:
   
   [source,console]
  ---------------------------------------------------
  -POST my-index-000001/_doc/1
  +----
  +POST my-index-000001/_doc/1?refresh
   {
     "is_published": true
   }
   
  -POST my-index-000001/_doc/2
  +POST my-index-000001/_doc/2?refresh
   {
     "is_published": false
   }
  
positive.code:       }
      }
    },
    "script_fields": {
      "is_published": {
        "script": {
          "lang": "painless",
          "source": "doc['is_published'].value"
        }
      }
    }
  }
  --------------------------------------------------
  
  [[boolean-params]]
  ==== Parameters for `boolean` fields
  
negative.code:   }
  }
  
  POST my-index-000001/_doc/1?refresh
  {
    "is_published": "true" <1>
  }
  