mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 08:59:09 +00:00
Exist requests are supposed to never throw an exception, but rather return true or false depending on whether some resource exists or not. Indices exists does that for indices and accepts wildcard expressions too. The way the api works internally is by resolving indices and catching IndexNotFoundException: if an exception is thrown the index does not exist hence it returns false, otherwise it returns true. That works ok only if ignore_unavailable and allow_no_indices indices options are both set to false, meaning that they are strict and any missing index or wildcard expressions that resolves to no indices will lead to an exception that can be thrown and cause false to be returned. Unfortunately the indices options have been configurable up until now for this request, meaning that one can set ignore_unavailable or allow_no_indices to true and have the indices exist request return true for indices that really don't exist, which makes very little sense in the context of this api. This commit removes the indicesOptions setter from the IndicesExistsRequest and makes settable only expandWildcardsOpen and expandWildcardsClosed, hence a subset of the available indices options. This way we can guarantee more consistent behaviour of the indices exists api. We can then remove the ignore_unavailable and allow_no_indices option from indices exists api spec
20 lines
742 B
Plaintext
20 lines
742 B
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.
|
|
|
|
==== 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.
|