Skip to content

Releases: elastic/elasticsearch-ruby

v9.3.0

03 Feb 16:41

Choose a tag to compare

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_routing from query parameters, should be sent in the body.
  • cat.segments - Adds :expan_wildcards, allow_no_indices, ignore_throttled, ignore_unavailable, allow_closed parameters.
  • 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 parameter close_job, if true the job associated with the datafeed is closed.
  • project.tags - Adds :project_routing parameter (This API is in technical preview and is only available in Serverless).
  • transform.get_node_stats - Adds parameters:
    • :error_trace - When set to true Elasticsearch 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 to true will return statistics in a format suitable for humans.
    • :pretty - If set to true the 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 the groq service.
  • inference.put_nvidia - Create an inference endpoint to perform an inference task with the nvidia service.
  • inference.put_openshift_ai - Create an inference endpoint to perform an inference task with the openshift_ai service.

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

28 Jan 13:51

Choose a tag to compare

  • 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 ostruct and benchmark have been added to Gemfiles when RUBY_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_wildcards Whether 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] :timeout parameter:

    • inference.chat_completion_unified
    • inference.completion
    • inference.inference
    • inference.put
    • inference.put_alibabacloud
    • inference.put_amazonbedrock
    • inference.put_amazonsagemaker
    • inference.put_anthropic
    • inference.put_azureaistudio
    • inference.put_azureopenai
    • inference.put_cohere
    • inference.put_deepseek
    • inference.put_elasticsearch
    • inference.put_elser
    • inference.put_googleaistudio
    • inference.put_googlevertexai
    • inference.put_hugging_face
    • inference.put_jinaai
    • inference.put_mistral
    • inference.put_openai
    • inference.put_voyageai
    • inference.put_watsonx
  • Update for ml.infer_trained_model_path:
    /_ml/trained_models/{model_id}/deployment/_infer is deprecated since version 8.2.0. The code has been updated to use
    /_ml/trained_models/{model_id}/_infer instead. 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

04 Nov 12:33

Choose a tag to compare

API changes

Code updated to the latest Elasticsearch 8.19.6 specification.

  • General: Better type documentation in source code for Number types.
  • esql.async_query_stop: New parameter:
    • [Boolean] :drop_null_columns Indicates whether columns that are entirely null will be removed from the columns and values portion of the results.
  • 🐈 Cat APIs update: The following parameters are now accepted in all the CAT APIs:
    • [String] :bytes The unit in which to display byte values (options: b, kb, mb, gb, tb, pb)
    • [String] :time The unit in which to display time values (options: d, h, m, s, ms, micros, nanos)
  • New parameters in cat.segments :
    • [String, Array] :expand_wildcards Type of index that wildcard expressions can match.
    • [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only.
    • [Boolean] :ignore_throttled If true, concrete, expanded or aliased indices are ignored when frozen.
    • [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response.
    • [Boolean] :allow_closed If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour.
  • 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. Documentation
  • query_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_time
  • fleet.search
  • graph.explore
  • index_lifecycle_management.move_to_step
  • index_lifecycle_management.put_lifecycle
  • indices.analyze
  • indices.put_data_lifecycle
  • indices.put_data_stream_options
  • indices.shrink
  • indices.split
  • inference.completion
  • inference.inference
  • inference.put
  • inference.put_alibabacloud
  • inference.put_amazonbedrock
  • inference.put_amazonsagemaker
  • inference.put_anthropic
  • inference.put_azureaistudio
  • inference.put_azureopenai
  • inference.put_cohere
  • inference.put_custom
  • inference.put_deepseek
  • inference.put_elasticsearch
  • inference.put_elser
  • inference.put_googleaistudio
  • inference.put_googlevertexai
  • inference.put_hugging_face
  • inference.put_jinaai
  • inference.put_mistral
  • inference.put_openai
  • inference.put_voyageai
  • inference.put_watsonx
  • inference.rerank
  • inference.sparse_embedding
  • inference.stream_completion
  • inference.text_embedding
  • inference.update
  • knn_search
  • render_search_template
  • scripts_painless_execute
  • snapshot_lifecycle_management.put_lifecycle
  • terms_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

03 Nov 09:41

Choose a tag to compare

Elasticsearch API

Updates API code to the latest Elasticsearch 9.1 specification.

  • Updates :bytes and :time parameters 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.
    • 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 :bytes parameter.
    • 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 :time parameter.
  • Adds available parameters to experimental Stream namespace APIs. Updates streams.logs_disable, streams.logs_enable, streams.status.

    • [Time] :master_timeout The period to wait for a connection to the master node.
    • [Time] :timeout The period to wait for a response.
    • [Boolean] :error_trace When set to true Elasticsearch will include the full stack trace of errors when they occur.
    • [String, Array] :filter_path Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch.
    • [Boolean] :human When set to true will return statistics in a format suitable for humans.
    • [Boolean] :pretty If set to true the returned JSON will be "pretty-formatted". Only use this option for debugging.
  • New parameters in cat.segments :

    • [String, Array] :expand_wildcards Type of index that wildcard expressions can match.
    • [Boolean] :allow_no_indices If false, the request returns an error if any wildcard expression, index alias, or _all value targets only.
    • [Boolean] :ignore_throttled If true, concrete, expanded or aliased indices are ignored when frozen.
    • [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response.
    • [Boolean] :allow_closed If true, allow closed indices to be returned in the response otherwise if false, keep the legacy behaviour.
  • watcher.put_watch - body is now required

v9.2.0

29 Oct 11:10

Choose a tag to compare

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] :index The name of the index that you would like an explanation for.
    • [Integer] :shard An identifier for the shard that you would like an explanation for.
    • [Boolean] :primary If true, returns an explanation for the primary shard for the specified shard ID.
    • [String] :current_node Explain a shard only if it is currently located on the specified node name or node ID.
  • get - New parameter:
    • [Boolean] :_source_exclude_vectors Whether vectors should be excluded from _source
  • indices.resolve_index - New parameter:
    • [String, Array] :mode Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.
  • search - New parameter:
    • [Boolean] :_source_exclude_vectors Whether vectors should be excluded from _source.
  • security.update_settings - New parameter:
    • [String] :merge_type The mapping merge type if mapping overrides are being provided in mapping_addition.

Breaking change - request body required

The :body parameter is now required in the following APIs:

  • close_point_in_time
  • fleet.search
  • graph.explore
  • index_lifecycle_management.move_to_step
  • index_lifecycle_management.put_lifecycle
  • indices.analyze
  • indices.put_data_lifecycle
  • indices.put_data_stream_options
  • indices.shrink
  • indices.split
  • inference.completion
  • inference.inference
  • inference.put_alibabacloud
  • inference.put_amazonbedrock
  • inference.put_amazonsagemaker
  • inference.put_anthropic
  • inference.put_azureaistudio
  • inference.put_azureopenai
  • inference.put_cohere
  • inference.put_custom
  • inference.put_deepseek
  • inference.put_elasticsearch
  • inference.put_elser
  • inference.put_googleaistudio
  • inference.put_googlevertexai
  • inference.put_hugging_face
  • inference.put_jinaai
  • inference.put_mistral
  • inference.put_openai
  • inference.put_voyageai
  • inference.put_watsonx
  • inference.rerank
  • inference.sparse_embedding
  • inference.stream_completion
  • inference.text_embedding
  • render_search_template
  • scripts_painless_execute
  • snapshot_lifecycle_management.put_lifecycle
  • terms_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 the ai21 service. Documentation
  • inference.put_contextualai - Create an inference endpoint to perform an inference task with the contexualai service. Documentation
  • inference.put_llama - Create an inference endpoint to perform an inference task with the llama service. Documentation
  • project.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

02 Sep 15:02

Choose a tag to compare

  • Fixes 2758 - msearch, bulk and other NDJSON endpoints overriding headers for content-type and accept. Pull Request.
  • Adds transform.set_upgrade_mode.
  • Updates source code documentation from latest 9.1 Elasticsearch specification.

v9.0.5

02 Sep 10:46

Choose a tag to compare

  • Fixes 2758 - msearch, bulk and other NDJSON endpoints overriding headers for content-type and accept. Pull Request.
  • Adds transform.set_upgrade_mode.

v8.19.1

28 Aug 10:06

Choose a tag to compare

  • 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

28 Aug 10:05

Choose a tag to compare

  • 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

07 Aug 10:05

Choose a tag to compare

Elasticsearch API

  • Updates source code documentation to latest 9.1 specification.
  • Adds inference.put_amazonsagemaker.