WARNING: Version 1.7 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Return values
editReturn values
edit-
The
okreturn value has been removed from all response bodies as it added no useful information. -
The
found,not_foundandexistsreturn values have been unified asfoundon all relevant APIs. -
Field values, in response to the
fieldsparameter, 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 whenfieldsis used to retrieve metadata like theroutingvalue, which are always singular. Metadata fields are always returned as scalars.The
fieldsparameter 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.fieldnameformat. For these you should use the_source_source_includeand_source_excludeparameters instead. -
Settings, like
index.analysis.analyzer.defaultare 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_settingsin the query string. -
The
analyzeAPI no longer supports the text response format, but does support JSON and YAML.