Breaking changes in 6.4

edit

This section discusses the changes that you need to be aware of when migrating your application to Elasticsearch 6.4.

See also Release Highlights and Release Notes.

API changes

edit

Field capabilities request format

edit

In the past, fields could be provided either as a parameter, or as part of the request body. Specifying fields in the request body is now deprecated, and instead they should always be supplied through a request parameter. In 7.0.0, the field capabilities API will not accept fields supplied in the request body.

Copying source settings during shrink/split operations

edit

In prior versions of Elasticsearch, resize operations (shrink/split) would only copy index.analysis, index.similarity, and index.sort settings from the source index. Elasticsearch 6.4.0 introduces a request parameter copy_settings which will copy all index settings from the source except for non-copyable index settings. This parameter defaults to false in 6.x, is immediately deprecated in 6.4.0, will only be able to be set to true in 8.x, and will be removed in 9.0.0. Note than when this parameter is used it means that all copyable settings will be copied; this includes the index blocks that must be put in place for a resize operation, and any allocation settings put in place in preparation for executing the resize operation. If you use this parameter, you will either have to follow up the operation with a request to adjust to the desired settings on the target index, or send the desired value of these settings with the resize operation.

Search and query DSL changes

edit

Limiting the length of regex that can be used in a Regexp Query request

edit

Regexp Query with long string made of many operators may run into a stack overflow. To safeguard against this, the maximum length of regex that can be used in a Regexp Query request has been limited to 1000. This default maximum can be changed for a particular index with the index setting index.max_regex_length.

Scripting

edit

Legacy stored script formats have been deprecated

edit

Stored script formats that don’t use top level script object have been deprecated and support for these formats will be removed in the next major release.

This includes template stored scripts format and formats that do not encapsulate the script inside a script json object.

REST Client

edit

Old low level performRequests deprecated

edit

The versions of performRequest and performRequestAsync that were in the low level client in 6.3 have been deprecated in favor of performRequest(Request) and performRequestAsync(Request, ActionListener). These will allow us to add more features to the client without adding more variants of performRequest.

Old high level request methods deprecated

edit

All request methods on the high level client have been deprecated in favor of a new variant that takes RequestOptions. This allows users of the high level client to customize many options on individual requests that were not available otherwise.

HostSniffer renamed to NodeSniffer and signature changed

edit

To provide allow the Sniffer to pick up more metadata we changed it from sniffing HttpHosts to sniffing Nodes, a new class introduced to contain both connection information and metadata like the node’s role or any attributes defined in elasticsearch.yml. These can be used by the new RequestOptions#setNodeSelector.