Elasticsearch Ruby Client release notes
Review the changes, fixes, and more in each version of Elasticsearch Ruby Client.
To check for security updates, go to Security announcements for the Elastic stack.
Check out breaking changes for this update.
- Tested versions of Ruby for 9.2.0: Ruby (MRI) 3.2, 3.3, 3.4, head, JRuby 9.3, JRuby 9.4 and JRuby 10.
- Cleaned up deprecated code for code generation in
elasticsearch-api/utils.
Code updated to the latest Elasticsearch 9.2 specification.
async_search.submit,cat.count,count,eql.search,field_caps,indices.resolve_index.msearch,msearch_template,open_point_in_time,search,search_mvt,search_template,sql.query- New parameter::project_routing. Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax. Supported in serverless only.
cluster.allocation_explain- New parameters:- [String]
:indexThe name of the index that you would like an explanation for. - [Integer]
:shardAn identifier for the shard that you would like an explanation for. - [Boolean]
:primaryIf true, returns an explanation for the primary shard for the specified shard ID. - [String]
:current_nodeExplain a shard only if it is currently located on the specified node name or node ID.
- [String]
get- New parameter:- [Boolean]
:_source_exclude_vectorsWhether vectors should be excluded from _source
- [Boolean]
indices.resolve_index- New parameter:- [String, Array<String>]
:modeFilter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.
- [String, Array<String>]
search- New parameter:- [Boolean]
:_source_exclude_vectorsWhether vectors should be excluded from _source.
- [Boolean]
security.update_settings- New parameter:- [String]
:merge_typeThe mapping merge type if mapping overrides are being provided in mapping_addition.
- [String]
indices.get_data_stream_mappings- Get mapping information for one or more data streams. Documentation.indices.put_data_stream_mappings- Update data stream mappings. Documentation.inference.put_ai21- Create an inference endpoint to perform an inference task with theai21service. Documentationinference.put_contextualai- Create an inference endpoint to perform an inference task with thecontexualaiservice. Documentationinference.put_llama- Create an inference endpoint to perform an inference task with thellamaservice. Documentationproject.tags(Experimental) - Return tags defined for the project.security.get_stats- Gather security usage statistics from all node(s) within the cluster. Documentation
- Fixes 2758 -
msearch,bulkand other NDJSON endpoints overriding headers forcontent-typeandaccept. Pull Request.
- Adds
transform.set_upgrade_mode. - Updates source code documentation from latest 9.1 Elasticsearch specification.
- Updates source code documentation to latest 9.1 specification.
- New API:
inference.put_amazonsagemaker.
Tested versions of Ruby for 9.1.0: Ruby (MRI) 3.2, 3.3, 3.4, head, JRuby 9.3, JRuby 9.4 and JRuby 10.
Source code documentation and code has been updated with better formatting, updated links. It's also been updated to support common parameters and common cat parameters in APIs that support it (
error_trace,filter_path,human,pretty). The API reference documentation can be generated withrake doc.esql.async_query,esql.query- addsallow_partial_resultsboolean parameter. Iftrue, partial results will be returned if there are shard failures, but the query can continue to execute on other clusters and shards. Iffalse, the query will fail if there are any failures. To override the default behavior, you can set theesql.query.allow_partial_resultscluster setting tofalse. Server default: true.indices.get_field_mapping- removeslocalparameter.synonyms.put_synonym,synonyms.put_synonym_rule- addrefreshboolean parameter. Iftrue, the request will refresh the analyzers with the new synonym rule and wait for the new synonyms to be available before returning.
esql.get_query(Experimental) - Get a specific running ES|QL query information.esql.list_queries(Experimental) - Get running ES|QL queries information.indices.delete_data_stream_options- Removes the data stream options from a data stream.indices.get_data_stream_options- Get the data stream options configuration of one or more data streams.indices.get_data_stream_settings- Get setting information for one or more data streams.indices.put_data_stream_options- Update the data stream options of the specified data streams.indices.put_data_stream_settings- Update data stream settings.indices.remove_block- Remove an index block from an index.inference.put_custom- Create a custom inference endpoint.inference.put_deepseek- Create a DeepSeek inference endpoint.snapshot.repository_verify_integrity(Experimental) - Verify the integrity of the contents of a snapshot repository. NOTE: This API is intended for exploratory use by humans. You should expect the request parameters and the response format to vary in future versions.streams.logs_disable- Disable the Logs Streams feature for this cluster.streams.logs_enable- Enable the Logs Streams feature for this cluster.streams.status- Return the current status of the streams feature for each streams type.
- Fixes 2758 -
msearch,bulkand other NDJSON endpoints overriding headers forcontent-typeandaccept. Pull Request.
- Adds
transform.set_upgrade_mode.
- Source code documentation and code has been updated to support common parameters and common cat parameters in APIs that support it (
error_trace,filter_path,human,pretty). The API reference documentation can be generated withrake doc. - New API:
inference.put_custom
- Adds
ccralias forcross_cluster_replicationandslmalias forsnapshot_lifecycle_management. - Tested for JRuby 10.0.0.
- General updates in source code docs.
- Udpates setting
AcceptandContent-Typeheaders as to not duplicate or overwrite user set headers #2666.
- The request headers were updated for Elasticsearch v9:
compatible-with=9#2660.
Ruby 3.2 and up are tested and supported for 9.0. Older versions of Ruby have reached their end of life. We follow Ruby’s own maintenance policy and officially support all currently maintained versions per Ruby Maintenance Branches. The required Ruby version is set to 2.6 to keep compatibility with JRuby 9.3. However, we only test the code against currently supported Ruby versions.
The size of both elasticsearch and elasticsearch-api gems is smaller than in previous versions. Some unnecessary files that were being included in the gem have now been removed. There has also been a lot of old code cleanup for the 9.x branch.
With the release of 9.0, the Elasticsearch Serverless client has been discontinued. You can use this client to build your Elasticsearch Serverless Ruby applications. The Elasticsearch Serverless API is fully supported. The CI build for Elasticsearch Ruby runs tests to ensure compatibility with Elasticsearch Serverless.
- The source code is now generated from
elasticsearch-specification, so the API documentation is much more detailed and extensive. The valueElasticsearch::ES_SPECIFICATION_COMMITis updated with the commit hash of elasticsearch-specification in which the code is based every time it's generated. - The API code has been updated for compatibility with Elasticsearch API v 9.0.
indices.get_field_mapping-:fieldsis a required parameter.knn_search- This API has been removed. It was only ever experimental and was deprecated in v8.4. It isn't supported in 9.0, and only works when the headercompatible-with=8is set. The search API should be used for all knn queries.- The functions in
utils.rbthat had names starting with double underscore have been renamed to remove these (e.g.__listifytolistify). - Namespaces clean up: The API namespaces are now generated dynamically based on the elasticsearch-specification. As such, some deprecated namespace files have been removed from the codebase:
- The
rollupnamespace was removed. The rollup feature was never GA-ed, it has been deprecated since8.11.0in favor of downsampling. - The
data_frame_deprecated,remotenamespace files have been removed, no APIs were available. - The
shutdownnamespace was removed. It is designed for indirect use by ECE/ESS and ECK. Direct use is not supported.
- The
The gem elasticsearch-api migrated away from the Elasticsearch REST API tests and test runner in CI. We now run the Elasticsearch Client tests with the Elasticsearch Tests Runner. This gives us more control on what we're testing and makes the Buildkite way faster in pull requests and scheduled builds.
- Some old rake tasks that were not being used have been removed. The rest were streamlined, the
esnamespace has been streamlined to make it easier to run Elasticsearch with Docker during development. Thedockertask namespace was merged intoes. - Elasticsearch's REST API Spec tests can still be ran with
rake test:deprecated:rest_apiand setting the corresponding value for the environment variableTEST_SUITE('platinum' or 'free').