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:       }
      }
    },
    "sort": [ "is_published" ],
    "fields": [
      {"field": "weight"}
    ],
    "runtime_mappings": {
      "weight": {
        "type": "long",
        "script": "emit(doc['is_published'].value ? 10 : 0)"
      }
    }
  }
  ----
  // TEST[s/_search/_search?filter_path=aggregations,hits.hits/]
  
  ////
  [source,console-result]
  ----
  {
    "aggregations": {
      "publish_state": {
        "doc_count_error_upper_bound": 0,
        "sum_other_doc_count": 0,
        "buckets": [
          {
            "key": 0,
            "key_as_string": "false",
            "doc_count": 1
          },
          {
            "key": 1,
            "key_as_string": "true",
            "doc_count": 1
          }
        ]
      }
    },
    "hits": {
      "hits": [
        {
          "_id": "2",
          "_index": "my-index-000001",
          "_score": null,
          "_source": {
            "is_published": false
          },
          "sort": [0],
          "fields": {"weight": [0]}
        },
        {
          "_id": "1",
          "_index": "my-index-000001",
          "_score": null,
          "_source": {
            "is_published": true
          },
          "sort": [1],
          "fields": {"weight": [10]}
        }
      ]
    }
  }
  ----
  ////
  
  [[boolean-params]]
  ==== Parameters for `boolean` fields
  