Skip to content

Releases: elastic/elasticsearch-ruby

7.14.0

04 Aug 10:02
Compare
Choose a tag to compare

Client

Added check that client is connected to an Elasticsearch cluster. If the client isn't connected to a supported Elasticsearch cluster the UnsupportedProductError exception will be raised.

This release changes the way in which the transport layer and the client interact. Previously, when using elasticsearch-transport, Elasticsearch::Transport::Client had a convenient wrapper, so it could be used as Elasticsearch::Client. Now, we are decoupling the transport layer from the Elasticsearch client. If you're using the elasticsearch gem, not much will change. It will instantiate a new Elasticsearch::Transport::Client when you instantiate Elasticsearch::Client and the endpoints from elasticsearch-api will be available.

Elasticsearch::Client has an attr_accessor for the transport instance:

> client = Elasticsearch::Client.new
> client.transport.class
=> Elasticsearch::Transport::Client
> client.transport.transport.class
=> Elasticsearch::Transport::Transport::HTTP::Faraday

The interaction with elasticsearch-api remains unchanged. You can use the API endpoints just like before:

> client.info
=> {"name"=>"instance",
 "cluster_name"=>"elasticsearch",
 "cluster_uuid"=>"id",
 "version"=>
  {"number"=>"7.14.0",
  ...
},
 "tagline"=>"You Know, for Search"}

Or perform request directly from the client which will return an Elasticsearch::Transport::Response object:

> client.perform_request('GET', '/')
# This is the same as doing client.transport.perform_request('GET', '/')
=> #<Elasticsearch::Transport::Transport::Response:0x000055c80bf94bc8
 @body=
  {"name"=>"instance",
   "cluster_name"=>"elasticsearch",
   "cluster_uuid"=>"id",
   "version"=>
    {"number"=>"7.14.0-SNAPSHOT",
    ...
    },
   "tagline"=>"You Know, for Search"},
 @headers=
  {"content-type"=>"application/json; charset=UTF-8",
   "content-length"=>"571",
   ...
   },
 @status=200>

If you have any problems, please report them in this issue.

API

Code is now generated from Elastic artifacts instead of checked out code of Elasticsearch. See the Generator README for more info.

  • Endpoints msearch, msearch_template and search_template remove query_and_fetch and dfs_query_and_fetch options from the search_type parameter.
  • New parameter include_repository in snapshot.get: (boolean) Whether to include the repository name in the snapshot info. Defaults to true.

X-Pack

X-Pack is being deprecated. The first time using xpack on the client, a warning will be triggered. Please check this issue for more information.

  • New endpoints: index_lifecycle_management.migrate_to_data_tiers, machine_learning.reset_job, security.saml_authenticate, security.saml_complete_logout, security.saml_invalidate, security.saml_logout, security.saml_prepare_authentication, security.saml_service_provider_metadata, sql.delete_async, sql.get_async, sql.get_async_status, terms_enum.
  • New experimental endpoints: machine_learning.infer_trained_model_deployment, machine_learning.start_trained_model_deployment, machine_learning.stop_trained_model_deployment.
  • Deprecation: indices.freeze and indices.unfreeze: Frozen indices are deprecated because they provide no benefit given improvements in heap memory utilization. They will be removed in a future release.

v7.14.0.pre

14 Jul 13:29
Compare
Choose a tag to compare
v7.14.0.pre Pre-release
Pre-release

This is a pre-release, but there are some important changes coming in version 7.14.0 of the client:

Client

This release changes the way in which the transport layer and the client interact. Previously, when using elasticsearch-transport, Elasticsearch::Transport::Client had a convenient wrapper, so it could be used as Elasticsearch::Client. Now, we are decoupling the transport layer from the Elasticsearch client. If you're using the elasticsearch gem, not much will change. It will instantiate a new Elasticsearch::Transport::Client when you instantiate Elasticsearch::Client and the endpoints from elasticsearch-api will be available.

Elasticsearch::Client has an attr_accessor for the transport instance:

> client = Elasticsearch::Client.new
> client.transport.class
=> Elasticsearch::Transport::Client
> client.transport.transport.class
=> Elasticsearch::Transport::Transport::HTTP::Faraday

The interaction with elasticsearch-api remains unchanged. You can use the API endpoints just like before:

> client.info
=> {"name"=>"instance",
 "cluster_name"=>"elasticsearch",
 "cluster_uuid"=>"id",
 "version"=>
  {"number"=>"7.14.0",
  ...
},
 "tagline"=>"You Know, for Search"}

Or perform request directly from the client which will return an Elasticsearch::Transport::Response object:

> client.perform_request('GET', '/')
# This is the same as doing client.transport.perform_request('GET', '/')
=> #<Elasticsearch::Transport::Transport::Response:0x000055c80bf94bc8
 @body=
  {"name"=>"instance",
   "cluster_name"=>"elasticsearch",
   "cluster_uuid"=>"id",
   "version"=>
    {"number"=>"7.14.0-SNAPSHOT",
    ...
    },
   "tagline"=>"You Know, for Search"},
 @headers=
  {"content-type"=>"application/json; charset=UTF-8",
   "content-length"=>"571",
   ...
   },
 @status=200>

If you have any problems, please report them in this issue.

7.13.3

12 Jul 08:33
Compare
Choose a tag to compare
  • API Support for Elasticsearch version 7.13.3

DSL v0.1.10

06 Jul 09:17
Compare
Choose a tag to compare
  • Adds auto_generate_synonyms_phrase_query (@andreasklinger) (3587ebe)
  • Adds minimum_should_match option to bool filters (@MothOnMars) (c127661)
  • Adds support for calendar_interval to DateHistogram (@tmaier) (a3214c5)
  • Removes auto_generate_phrase_queries deprecated parameter (850eaba)
  • Removes deprecated interval parameter (6b2e3ba)
  • Use pry-byebug for MRI and pry-nav for JRuby
  • Improves running tests (default value for cluster set to http://localhost:9200)

7.13.1

02 Jun 17:45
Compare
Choose a tag to compare

Client

  • Support for Elasticsearch version 7.13.1
  • Fixes thread safety issue in get_connection - [https://github.com//pull/1325](Pull Request).

7.13.0

25 May 13:17
Compare
Choose a tag to compare

Client

  • Support for Elasticsearch version 7.13.0
  • Adds support for compatibility header for Elasticsearch. If the environment variable 'ELASTIC_CLIENT_APIVERSIONING' is set to true or 1, the client will send the headers Accept and Content-Type with the following value: application/vnd.elasticsearch+json;compatible-with=7.
  • Better detection of Elasticsearch and Enterprise Search clients in the meta header used by cloud.

API

  • The REST API tests now use an artifact downloaded from the Elastic servers instead of depending of cloning elasticsearch locally. Check the README for more information.
  • New parameter include_unloaded_segments in cat.nodes, nodes.stats: If set to true segment stats will include stats for segments that are not currently loaded into memory
  • New parameter summary in ingest.get_pipeline: Return pipelines without their definitions (default: false)
  • New parameter index_details in snapshot.get: Whether to include details of each index in the snapshot, if those details are available. Defaults to false.
  • New endpoint features.reset_features, ingest/geo_ip_stats
  • New experimental endpoints: shutdown.delete_node, shutdown.get_node, shutdown.put_node.

X-Pack

  • Refactored test tasks, made it easier to run the tests by default.
  • New experimental endpoints: fleet.global_checkpoints, searchable_snapshots.cache_stats.
  • New beta endpoints: security.clear_cached_service_tokens, security.create_service_token, security.delete_service_token, security.get_service_accounts, security.get_service_credentials
  • New endpoints: machine_learning.delete_trained_model_alias, machine_learning.preview_data_frame_analytics, machine_learning.put_trained_model_alias.
  • APIs migrated from experimental or beta to stable: machine_learning.delete_data_frame_analytics, machine_learning.delete_trained_model, machine_learning.estimate_model_memory, machine_learning.explain_data_frame_analytics, machine_learning.get_data_frame_analytics, machine_learning.get_data_frame_analytics_stats, machine_learning.get_trained_models, machine_learning.get_trained_models_stats, machine_learning.put_data_frame_analytics, machine_learning.put_trained_model, machine_learning.start_data_frame_analytics, machine_learning.stop_data_frame_analytics, machine_learning.update_data_frame_analytics
  • New parameter body in machine_learning.preview_datafeed: The datafeed config and job config with which to execute the preview.

7.13.0.pre

11 May 15:36
Compare
Choose a tag to compare
7.13.0.pre Pre-release
Pre-release

-Support for Elasticsearch version 7.13.0
-This is a pre-release, full Changelog details will be published with the final release of 7.13.0

7.12.0

23 Mar 15:52
Compare
Choose a tag to compare

7.12.0

Client

  • Support for Elasticsearch version 7.12.0
  • Ruby 3 is now tested, it was added to the entire test suite.
  • New official documentation pages for configuration: Basic Configuration and Advanced Configuration.
  • Integration tests runner refactored to keep skipped tests in a yaml file.

API

  • New API namespace: features and endpoints features.get_features and snapshot.get_features.
  • cat.plugins adds parameter include_bootstrap: Include bootstrap plugins in the response.
  • Update in indices.close parameter wait_for_active_shards: Sets the number of active shards to wait for before the operation returns. Set to index-setting to wait according to the index setting index.write.wait_for_active_shards, or all to wait for all shards, or an integer. Defaults to 0.
  • actions.search adds parameter min_compatible_shard_node: The minimum compatible version that all shards involved in search should have for this request to be successful.

X-Pack

  • New API namespace: text_structure and endpoints text_structure.find_structure.
  • New API namespace: logstash and endpoints logstash.delete_pipeline, logstash.get_pipeline, logstash.put_pipeline.
  • New API: eql.get_status.
  • APIs migrated from experimental to stable: autoscaling.delete_autoscaling_policy, autoscaling.get_autoscaling_capacity, autoscaling.get_autoscaling_policy, autoscaling.put_autoscaling_policy.
  • searchable_snapshots.mount adds parameter storage: Selects the kind of local storage used to accelerate searches. Experimental, and defaults to full_copy.
  • searchable_snapshots.stats adds parameter level: Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards).

7.11.2

25 Feb 18:19
Compare
Choose a tag to compare

7.11.2

Client

  • Bug fix in meta header, fixes fail when http adapter library hasn't been loaded yet: Issue.

7.11.1

11 Feb 18:42
Compare
Choose a tag to compare

Client

  • Bug fix in meta header, adds support for unknown Faraday adapters. Pull Request.