mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
Now that indices have a single type by default, we can move to the next step and identify documents using their `_id` rather than the `_uid`. One notable change in this commit is that I made deletions implicitly create types. This helps with the live version map in the case that documents are deleted before the first type is introduced. Otherwise there would be no way to differenciate `DELETE index/foo/1` followed by `PUT index/foo/1` from `DELETE index/bar/1` followed by `PUT index/foo/1`, even though those are different if versioning is involved.
61 lines
2.5 KiB
Plaintext
61 lines
2.5 KiB
Plaintext
[[breaking_60_rest_changes]]
|
|
=== REST changes
|
|
|
|
==== Unquoted JSON
|
|
|
|
In previous versions of Elasticsearch, JSON documents were allowed to contain unquoted field names.
|
|
This feature was removed in the 5.x series, but a backwards-compatibility layer was added via the
|
|
system property `elasticsearch.json.allow_unquoted_field_names`. This backwards-compatibility layer
|
|
has been removed in Elasticsearch 6.0.0.
|
|
|
|
==== Duplicate Keys in JSON, CBOR, Yaml and Smile
|
|
|
|
In previous versions of Elasticsearch, documents were allowed to contain duplicate keys. Elasticsearch 6.0.0
|
|
enforces that all keys are unique. This applies to all content types: JSON, CBOR, Yaml and Smile.
|
|
|
|
==== Content-Type Auto-detection
|
|
|
|
In previous versions of Elasticsearch, having a proper Content-Type for the data in a request was not enforced.
|
|
Elasticsearch 6.0.0 enforces that all requests with a body must have a supported Content-Type and this type will
|
|
be used when parsing the data.
|
|
|
|
When using the `source` query string parameter, the `source_content_type` parameter must also be specified with
|
|
the media type of the source.
|
|
|
|
==== Boolean API parameters
|
|
|
|
All REST APIs parameters (both request parameters and JSON body) support providing boolean "false" as the
|
|
value `false` and boolean "true" as the value `true`. All other values will raise an error.
|
|
|
|
==== Analyze API changes
|
|
|
|
The deprecated request parameters and plain text in request body has been removed. Define parameters in request body.
|
|
|
|
==== Indices exists API
|
|
|
|
The `ignore_unavailable` and `allow_no_indices` options are no longer accepted
|
|
as they could cause undesired results when their values differed from their
|
|
defaults.
|
|
|
|
==== `timestamp` and `ttl` in index requests
|
|
|
|
`timestamp` and `ttl` are not accepted anymore as parameters of index/update
|
|
requests.
|
|
|
|
==== Refresh requests with one or more shard failures return HTTP 500 response instead of 200
|
|
|
|
Refresh requests that are broadcast to multiple shards that can have one or more
|
|
shards fail during the request now return a 500 response instead of a 200
|
|
response in the event there is at least one failure.
|
|
|
|
==== Delete by Query API requires an explicit query
|
|
|
|
In previous versions of Elasticsearch, delete by query requests without an explicit query
|
|
were accepted, match_all was used as the default query and all documents were deleted
|
|
as a result. From version 6.0.0, delete by query requests require an explicit query.
|
|
|
|
=== DELETE document calls now implicitly create the type
|
|
|
|
Running `DELETE index/type/id` now implicitly creates `type` with a default
|
|
mapping if it did not exist yet.
|