Return valuesedit

  • The ok return value has been removed from all response bodies as it added no useful information.
  • The found, not_found and exists return values have been unified as found on all relevant APIs.
  • Field values, in response to the fields parameter, are now always returned as arrays. A field could have single or multiple values, which meant that sometimes they were returned as scalars and sometimes as arrays. By always returning arrays, this simplifies user code. The only exception to this rule is when fields is used to retrieve metadata like the routing value, which are always singular. Metadata fields are always returned as scalars.

    The fields parameter is intended to be used for retrieving stored fields, rather than for fields extracted from the _source. That means that it can no longer be used to return whole objects and it no longer accepts the _source.fieldname format. For these you should use the _source _source_include and _source_exclude parameters instead.

  • Settings, like index.analysis.analyzer.default are now returned as proper nested JSON objects, which makes them easier to work with programatically:

        "index": {
            "analysis": {
                "analyzer": {
                    "default": xxx

    You can choose to return them in flattened format by passing ?flat_settings in the query string.

  • The analyze API no longer supports the text response format, but does support JSON and YAML.