Releases: elastic/elasticsearch-ruby
v9.3.0
Gem
- Tested versions of Ruby for 9.2.0: Ruby (MRI) 3.2, 3.3, 3.4, 4.0, JRuby 9.3, JRuby 9.4 and JRuby 10.
Support for base64 indexing for vector values
Adds support for base64 ingestion of floating point arrays. You can use this by calling the client's pack_dense_vector function with the data to be converted to Base64 vector encoding for Bulk ingestion:
> data = [1.0, 2.0]
=> [1.0, 2.0]
> client.pack_dense_vector(data)
=> "P4AAAEAAAAA="See the Pull Request in Elasticsearch for more information. This change introduces base64 as a dependency.
ES|QL Query Builder
The Ruby ES|QL Query Builder version 0.4.0 has been released. The recent new versions add support for several functions: TS for time series indices, STATS, 🐔, FORK and FUSE.
Elasticsearch API
API updates
async_search.submit,cat.count,count,field_caps,indices.resolve_index,open_point_in_time,search,sql.query- removes parameter:project_routingfrom query parameters, should be sent in the body.cat.segments- Adds:expan_wildcards,allow_no_indices,ignore_throttled,ignore_unavailable,allow_closedparameters.indices.cancel_migrate_reindex,indices.create_from,indices.get_index_template,indices.migrate_reindex- promoted from Techincal Preview to stable.machine_learning.start_data_frame_analytics,machine_learning.stop_data_frame_analytics,machine_learning.stop_trained_model_deployment- Request body added as a parameter.machine_learning.stop_datafeed- adds parameterclose_job, iftruethe job associated with the datafeed is closed.project.tags- Adds:project_routingparameter (This API is in technical preview and is only available in Serverless).transform.get_node_stats- Adds parameters::error_trace- When set totrueElasticsearch will include the full stack trace of errors when they occur.:filter_path- Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.:human- When set totruewill return statistics in a format suitable for humans.:pretty- If set totruethe returned JSON will be "pretty-formatted". Use this option for debugging only.
New APIs
cat.circuit_breaker- Get circuit breakers statistics. (CAT APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications)inference.put_groq- Create an inference endpoint to perform an inference task with thegroqservice.inference.put_nvidia- Create an inference endpoint to perform an inference task with thenvidiaservice.inference.put_openshift_ai- Create an inference endpoint to perform an inference task with theopenshift_aiservice.
New APIs in Technical Preview
esql.delete_view- Deletes a stored ES|QL view.esql.get_view- Returns a stored ES|QL view.esql.put_view- Create or update an ES|QL view.indices.delete_sample_configuration- Delete the sampling configuration for the specified index.indices.get_all_configuration- Get the sampling configurations for all indices.indices.get_sample- Request for a random sample of raw documents ingested into the given index or data stream.indices.get_sample_configuration- Get the sampling configuration for the specified index.indices.get_sample_stats- Request stats for a random sample of raw documents ingested into the given index or data stream.indices.put_sample_configuration- Create or update the sampling configuration for the specified index.
v8.19.3
- Dev: This release replaces the deprecated artifacts API with a new up to date one (https://github.com/elastic/elasticsearch-ruby/pull/2844[Pull Request]). This is used for downloading the REST tests and specification from Elasticsearch in development.
- Dev: The 8.19 branch now tests for Ruby 4.0, so the gems
ostructandbenchmarkhave been added to Gemfiles whenRUBY_VERSION >= '4'.
API Changes
-
Code updated to the latest Elasticsearch 8.19.11 specification.
-
General source code documentation updates.
-
indices.data_streams_stats- New parameter: [List]:expand_wildcardsWhether to expand wildcard expressions to concrete data stream names that are open, closed or both. (options: all, closed, hidden, none, open) -
Inference APIs add [Time]
:timeoutparameter:inference.chat_completion_unifiedinference.completioninference.inferenceinference.putinference.put_alibabacloudinference.put_amazonbedrockinference.put_amazonsagemakerinference.put_anthropicinference.put_azureaistudioinference.put_azureopenaiinference.put_cohereinference.put_deepseekinference.put_elasticsearchinference.put_elserinference.put_googleaistudioinference.put_googlevertexaiinference.put_hugging_faceinference.put_jinaaiinference.put_mistralinference.put_openaiinference.put_voyageaiinference.put_watsonx
-
Update for
ml.infer_trained_model_path:
/_ml/trained_models/{model_id}/deployment/_inferis deprecated since version 8.2.0. The code has been updated to use
/_ml/trained_models/{model_id}/_inferinstead. The response object is different and will return:
{
"inference_results":
[
{"predicted_value": [[1.0,1.0]]}
]
}Instead of:
{"predicted_value": [[1.0,1.0]]}v8.19.2
API changes
Code updated to the latest Elasticsearch 8.19.6 specification.
- General: Better type documentation in source code for
Numbertypes. esql.async_query_stop: New parameter:- [Boolean]
:drop_null_columnsIndicates whether columns that are entirelynullwill be removed from thecolumnsandvaluesportion of the results.
- [Boolean]
- 🐈 Cat APIs update: The following parameters are now accepted in all the CAT APIs:
- [String]
:bytesThe unit in which to display byte values (options: b, kb, mb, gb, tb, pb) - [String]
:timeThe unit in which to display time values (options: d, h, m, s, ms, micros, nanos)
- [String]
- New parameters in
cat.segments:- [String, Array]
:expand_wildcardsType of index that wildcard expressions can match. - [Boolean]
:allow_no_indicesIffalse, the request returns an error if any wildcard expression, index alias, or _all value targets only. - [Boolean]
:ignore_throttledIftrue, concrete, expanded or aliased indices are ignored when frozen. - [Boolean]
:ignore_unavailableIf true, missing or closed indices are not included in the response. - [Boolean]
:allow_closedIf true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour.
- [String, Array]
- These Connector APIs have been promoted from Experimental to Beta:
connector.delete,connector.get,connector.list,connector.post,connector.put,connector.sync_job_cancel,connector.sync_job_delete,connector.sync_job_get,connector.sync_job_list,connector.sync_job_post,connector.update_api_key_id,connector.update_configuration,connector.update_filtering,connector.update_index_name,connector.update_name,connector.update_native,connector.update_pipeline,connector.update_scheduling,connector.udpate_service_type. indices.create_from- Create an index from a source index. Migrated from Experimental to Stable. Documentationquery_rules.test- Test a query ruleset. Migrated from Experimental to Stable.search_application.delete,search_application.get,search_application.list,search_application.put, `search_application.search** - Migrated from Experimental to Beta.
Breaking change - request body required
The :body parameter is now required in the following APIs:
close_point_in_timefleet.searchgraph.exploreindex_lifecycle_management.move_to_stepindex_lifecycle_management.put_lifecycleindices.analyzeindices.put_data_lifecycleindices.put_data_stream_optionsindices.shrinkindices.splitinference.completioninference.inferenceinference.putinference.put_alibabacloudinference.put_amazonbedrockinference.put_amazonsagemakerinference.put_anthropicinference.put_azureaistudioinference.put_azureopenaiinference.put_cohereinference.put_custominference.put_deepseekinference.put_elasticsearchinference.put_elserinference.put_googleaistudioinference.put_googlevertexaiinference.put_hugging_faceinference.put_jinaaiinference.put_mistralinference.put_openaiinference.put_voyageaiinference.put_watsonxinference.rerankinference.sparse_embeddinginference.stream_completioninference.text_embeddinginference.updateknn_searchrender_search_templatescripts_painless_executesnapshot_lifecycle_management.put_lifecycleterms_enum
New APIs
indices.cancel_migrate_reindex- Cancel a migration reindex operation.indices.get_migrate_reindex_status- Get the migration reindexing status.indices.migrate_reindex- Reindex legacy backing indices
Migrate data stream documentation
v9.1.3
Elasticsearch API
Updates API code to the latest Elasticsearch 9.1 specification.
-
Updates
:bytesand:timeparameters in Cat endpoints:cat.aliases,cat.allocation,cat.component_templates,cat.count,cat.fielddata,cat.health,cat.indices,cat.master,cat.ml_data_frame_analytics,cat.ml_datafeeds,cat.ml_jobs,cat.ml_trained_models,cat.nodeattrs,cat.nodes,cat.pending_tasks,cat.plugins,cat.recovery,cat.repositories,cat.segments,cat.shards,cat.snapshots,cat.tasks,cat.templates,cat.thread_pool,cat.transforms:- Adds
:bytes[String] - Sets the units for columns that contain a byte-size value - Adds
:time[String] - Sets the units for columns that contain a time duration.
- Adds
cat.allocation,cat.fielddata,cat.health,cat.indices,cat.ml_data_frame_analytics,cat.ml_jobs,cat.ml_trained_models,cat.nodes,cat.recovery,cat.segments,cat.shards:- Removes
:bytesparameter.
- Removes
cat.indices,cat.ml_data_frame_analytics,cat.ml_datafeeds,cat.ml_jobs,cat.ml_trained_models,cat.nodes,cat.pending_tasks,cat.recovery,cat.shards,cat.snapshots,cat.tasks,cat.thread_pool,cat.transforms:- Removes
:timeparameter.
- Removes
-
Adds available parameters to experimental Stream namespace APIs. Updates
streams.logs_disable,streams.logs_enable,streams.status.- [Time]
:master_timeoutThe period to wait for a connection to the master node. - [Time]
:timeoutThe period to wait for a response. - [Boolean]
:error_traceWhen set totrueElasticsearch will include the full stack trace of errors when they occur. - [String, Array]
:filter_pathComma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. - [Boolean]
:humanWhen set totruewill return statistics in a format suitable for humans. - [Boolean]
:prettyIf set totruethe returned JSON will be "pretty-formatted". Only use this option for debugging.
- [Time]
-
New parameters in
cat.segments:- [String, Array]
:expand_wildcardsType of index that wildcard expressions can match. - [Boolean]
:allow_no_indicesIffalse, the request returns an error if any wildcard expression, index alias, or _all value targets only. - [Boolean]
:ignore_throttledIftrue, concrete, expanded or aliased indices are ignored when frozen. - [Boolean]
:ignore_unavailableIf true, missing or closed indices are not included in the response. - [Boolean]
:allow_closedIf true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour.
- [String, Array]
-
watcher.put_watch- body is now required
v9.2.0
Gem
- 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.
Elasticsearch API
Code updated to the latest Elasticsearch 9.2 specification.
API Updates
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]
:modeFilter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.
- [String, Array]
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]
Breaking change - request body required
The :body parameter is now required in the following APIs:
close_point_in_timefleet.searchgraph.exploreindex_lifecycle_management.move_to_stepindex_lifecycle_management.put_lifecycleindices.analyzeindices.put_data_lifecycleindices.put_data_stream_optionsindices.shrinkindices.splitinference.completioninference.inferenceinference.put_alibabacloudinference.put_amazonbedrockinference.put_amazonsagemakerinference.put_anthropicinference.put_azureaistudioinference.put_azureopenaiinference.put_cohereinference.put_custominference.put_deepseekinference.put_elasticsearchinference.put_elserinference.put_googleaistudioinference.put_googlevertexaiinference.put_hugging_faceinference.put_jinaaiinference.put_mistralinference.put_openaiinference.put_voyageaiinference.put_watsonxinference.rerankinference.sparse_embeddinginference.stream_completioninference.text_embeddingrender_search_templatescripts_painless_executesnapshot_lifecycle_management.put_lifecycleterms_enum
New APIs
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
v9.1.2
- 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.
v9.0.5
- Fixes 2758 -
msearch,bulkand other NDJSON endpoints overriding headers forcontent-typeandaccept. Pull Request. - Adds
transform.set_upgrade_mode.
v8.19.1
- Updated source code documentation links to Elasticsearch documentation to 8.19
- Adds
transform.set_upgrade_mode- Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
v8.18.1
- Updates API code to the latest Elasticsearch 8.18 specification.
- Adds
inference.put_custom- Configure a custom inference endpoint. - Adds
transform.set_upgrade_mode- Sets a cluster wide upgrade_mode setting that prepares transform indices for an upgrade.
v9.1.1
Elasticsearch API
- Updates source code documentation to latest 9.1 specification.
- Adds inference.put_amazonsagemaker.