chore(deps): update dependency elasticsearch to v8 #2

Closed
renovate wants to merge 1 commits from renovate/elasticsearch-8.x into main
Member

This PR contains the following updates:

Package Update Change
elasticsearch (source, changelog) major '>= 7', '< 7.14' -> '>= 7', '< 8.13.1'

Release Notes

elastic/elasticsearch-ruby (elasticsearch)

v8.13.0

Compare Source

Client
  • Tested versions of Ruby for 8.13.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4.
Experimental ES|QL Helper

This version provides a new experimental Helper for the ES|QL query API. Please check out the documentation and open an issue if you encounter any problems or have any feedback.

API

API Changes:

  • async_search.status - adds Time :keep_alive parameter: Specify the time interval in which the results (partial or final) for this search will be available.
  • bulk - adds boolean :require_data_stream parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false.
  • connector.list - Adds the following parameters:
    • :index_name (List): A comma-separated list of connector index names to fetch connector documents for.
    • :connector_name (List): A comma-separated list of connector names to fetch connector documents for.
    • :service_type (List): A comma-separated list of connector service types to fetch connector documents for.
    • :query (String): A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names.
  • esql.query - adds boolean :drop_null_columns parameter: Should entirely null columns be removed from the results? Their name and type will be returning in a new all_columns section.
  • field_caps - Adds :include_empty_fields boolean parameter: Include empty fields in result.
  • index - adds boolean :require_data_stream parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false.
  • indices.rollover - adds boolean :lazy parameter: If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams.
  • connector_sync_job.list - adds List :job_type parameter: A comma-separated list of job types.
  • inference.delete_model, inference.get_model, inference.inference, inference.put_model: renames :model_id parameter to :inference_id.
  • termvector will show a warning since it's been deprecated. Please use the plural version, termvectors.

New APIs:

  • indices.resolve_cluster - Resolves the specified index expressions to return information about each cluster, including the local cluster, if included.
  • profiling.flamegraph - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling.
  • profiling.stacktraces - Extracts raw stacktrace information from Universal Profiling.
  • security.query_user - Retrieves information for Users using a subset of query DSL
  • text_structure.test_grok_pattern - Tests a Grok pattern on some text.

APIs Migrated from experimental to stable:

  • synonyms.delete_synonym
  • synonyms.delete_synonym_rule
  • synonyms.get_synonym
  • synonyms.get_synonym_rule
  • synonyms.get_synonyms_sets
  • synonyms.put_synonym
  • synonyms.put_synonym_rule

New Experimental APIs:

  • connector.update_api_key_id - Updates the API key id and/or API key secret id fields in the connector document.
  • connector.update_index_name - Updates the index name of the connector.
  • connector.update_native - Updates the is_native flag of the connector.
  • connector.update_service_type - Updates the service type of the connector.
  • connector.update_status - Updates the status of the connector.
  • esql.async_query - Executes an ESQL request asynchronously
  • esql.async_query_get - Retrieves the results of a previously submitted async query request given its ID.

New Experimental namespace connector_secret:

  • connector_secret.delete - Deletes a connector secret.
  • connector_secret.get - Retrieves a secret stored by Connectors.
  • connector_secret.post - Creates a secret for a Connector.
  • connector_secret.put - Creates or updates a secret for a Connector.
Development
  • Migrated from byebug to debug.
  • Added extra testing for OpenTelemetry.

v8.12.2

Compare Source

Drops runtime dependency on base64. Thanks Earlopain! Pull Request: #​2295.

v8.12.1

Compare Source

Adds base64 dependency: base64 was added to the gemspec, since starting in Ruby 3.4.0, base64 will no longer be part of the default gems and will no longer be in the standard library.

Base64 is used for API key and Cloud ID. The dependency used to be declared in transport, but it's not needed there since the implementation using it is in this codebase. It was removed from transport in the latest patch releases: 8.1.3, 8.2.5 and 8.3.1.

v8.12.0

Compare Source

Client
  • Tested versions of Ruby for 8.12.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4.
API

API Changes:

  • bulk - Adds boolean :list_executed_pipelines parameter: Sets list_executed_pipelines for all incoming documents. Defaults to unset (false).
  • indices.put_settings - Adds boolean :reopen parameter: Whether to close and reopen the index to apply non-dynamic settings. If set to true the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is false.
  • open_point_in_time - Adds Hash :body parameter: an index_filter specified with the Query DSL.
  • security.get_api_key - Adds boolean :active_only parameter: flag to limit response to only active (not invalidated or expired) API keys.
New APIs

New API for Universal profiling:

  • profiling.status - Returns basic information about the status of Universal Profiling.

New experimental API:

Connectors API

Version 8.12 introduces the experimental Connectors API. Use the following APIs to manage connectors:

  • connector.post - Creates a connector. See documentation
  • connector.put - Creates or updates a connector. See documentation
  • connector.delete - Deletes a connector. See documentation
  • connector.get - Returns the details about a connector. See documentation
  • connector.list - Lists all connectors. See documentation
  • connector.check_in - Updates the last_seen timestamp in the connector document. See documentation
  • connector.update_configuration - Updates the connector configuration. See documentation
  • connector.update_error - Updates the error field in the connector document. See documentation
  • connector.update_filtering - Updates the filtering field in the connector document. See documentation
  • connector.last_sync - Updates the stats of last sync in the connector document. See documentation
  • connector.update_name - Updates the name and/or description fields in the connector document. See documentation
  • connector.update_pipeline - Updates the pipeline field in the connector document. See documentation
  • connector.update_scheduling - Updates the scheduling field in the connector document. See documentation

Use the following APIs to manage sync jobs:

  • connector_sync_job.cancel - Cancels a connector sync job. See documentation
  • connector_sync_job.check_in - Checks in a connector sync job (refreshes 'last_seen'). See documentation
  • connector_sync_job.delete - Deletes a connector sync job. See documentation
  • connector_sync_job.error - Sets an error for a connector sync job. See documentation
  • connector_sync_job.get - Returns the details about a connector sync job. See documentation
  • connector_sync_job.list - Lists all connector sync jobs. See documentation
  • connector_sync_job.post - Creates a connector sync job. See documentation
  • connector_sync_job.update_stats - Updates the stats fields in the connector sync job document. See documentation

v8.11.2

Compare Source

Drops runtime dependency on base64. Thanks Earlopain! Pull Request: #​2295.

v8.11.1

Compare Source

Adds base64 dependency: base64 was added to the gemspec, since starting in Ruby 3.4.0, base64 will no longer be part of the default gems and will no longer be in the standard library.

Base64 is used for API key and Cloud ID. The dependency used to be declared in transport, but it's not needed there since the implementation using it is in this codebase. It was removed from transport in the latest patch releases: 8.1.3, 8.2.5 and 8.3.1.

v8.11.0

Compare Source

Client
  • Tested versions of Ruby for 8.11.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4.
  • Adds native support for Open Telemetry. See Open Telemetry for documentation.
  • Improved documentation, now you can find more examples in Ruby in the REST API reference.
API

New Experimental APIs:

  • esql.query - Executes an ESQL request.
  • inference.delete_model - Delete model in the Inference API.
  • inference.get_model - Get a model in the Inference API.
  • inference.inference - Perform inference on a model.
  • inference.put_model - Configure a model for use in the Inference API.

v8.10.0

Compare Source

Client
  • Tested versions of Ruby for 8.10.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4.
API
New Experimental APIs, for internal use:
  • fleet.delete_secret
  • fleet.get_secret
  • fleet.post_secret
New stable APIs:
  • security.get_settings - Retrieve settings for the security system indices
  • security.update_settings - Update settings for the security system indices
New Experimental API:
  • query_ruleset.list List query rulesets.
API Changes:
  • indices.reload_search_analyzers - Adds parameter resource changed resource to reload analyzers from if applicable

Promoted from Experimental to Beta:

  • security.create_cross_cluster_api_key
  • security.update_cross_cluster_api_key
Synonyms namespace update:

All synonym related APIs have been moved to the synonyms namespace and some of the endpoints have been renamed, as well as their parameters:

  • synonyms.delete => synonyms.delete_synonym - requires id, the id of the synonyms set to be deleted.
  • synonyms.get => synonyms.get_synonym - requires id, the name of the synonyms set to be retrieved.
  • synonyms_set.get_synonyms_sets => synonyms.get_synonyms_sets
  • synonyms.put => synonyms.put_synonym - requires id of the synonyms set to be created or updated.
  • synonym_rule.put => synonyms.put_synonym_rule - Parameters changed to set_id (the id of the synonym set to be updated with the synonym rule) and rule_id (the id of the synonym rule to be updated or created).
  • New Experimental API synonyms.delete_synonym_rule - Deletes a synonym rule in a synonym set
  • New Experimental API synonyms.get_synonym_rule - Retrieves a synonym rule from a synonym set

v8.9.0

Compare Source

Client
  • Tested versions of Ruby for 8.9.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4.
  • Updated product validation. The code for the product validation was refactored in a few ways:
    • Just check header, does not check the version of the server.
    • Warns only once when there's a general server error.
    • Removes the call to '/' (client.info) when doing the first request, checking on the first actual request from the client.
  • Fixes User-Agent code. In the migration to 8.x, the user agent code was extracted into transport, since we're now using that library in other projects. So for the Elasticsearch Client, the user-agent would be reported as the one defined in elastic-transport. This release fixes the issue and brings back the user agent in the format that was being used in 7.x
Helpers

This release introduces two new Helpers in the client:

  • BulkHelper - This helper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {es}.
  • ScrollHelper - This helper provides an easy way to get results from a Scroll.

See Helpers to read more about them.

API
New APIs
  • cluster.info - Returns different information about the cluster.
New Experimental APIs and namespaces:

This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

  • New namespace: query_ruleset
    • query_ruleset.delete - Deletes a query ruleset.
    • query_ruleset.get - Returns the details about a query ruleset.
    • query_ruleset.put - Creates or updates a query ruleset.
  • New API: search_application.render_query Renders a query for given search application search parameters.
  • New API: security.create_cross_cluster_api_key - Creates a cross-cluster API key for API key based remote cluster access.
  • New API: security.upate_cross_cluster_api_key - Updates attributes of an existing cross-cluster API key.
  • New namespace: synonyms
    • synonyms.delete- Deletes a synonym set
    • synonyms.get - Retrieves a synonym set
    • synonyms.put - Creates or updates a synonyms set
  • New namespace: synonym_rule
    • synonym_rule.put - Creates or updates a synonym rule in a synonym set
  • New namespace: synonyms
    • synonyms_set.get - Retrieves a summary of all defined synonym sets

v8.8.0

Compare Source

  • Tested versions of Ruby for 8.8.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4.
API
  • Updates development dependency minitest-reporters to >= 1.6 to include showing failures at the end of the test run.
New APIs
  • watcher.get_settings - Retrieve settings for the watcher system index.
  • watcher.update_settings - Update settings for the watcher system index.
New Experimental APIs
  • indices.delete_data_lifecycle- Deletes the data lifecycle of the selected data streams
  • indices.explain_data_lifecycle - Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc.
  • indices.get_data_lifecycle - Returns the data lifecycle of the selected data streams.
  • indices.put_data_lifecycle - Updates the data lifecycle of the selected data streams.
  • search_application.delete - Deletes a search application.
  • search_application.delete_behavioral_analytics - Delete a behavioral analytics collection.
  • search_application.get - Returns the details about a search application.
  • search_application.get_behavioral_analytics - Returns the existing behavioral analytics collections.
  • search_application.list - Returns the existing search applications.
  • search_application.post_behavioral_analytics_event - Creates a behavioral analytics event for existing collection.
  • search_application.put - Creates or updates a search application.
  • search_application.put_behavioral_analytics - Creates a behavioral analytics collection.
  • search_application.search - Perform a search against a search application.
API Changes
  • clear_scroll now works with the argument ignore: 404. Issue on GitHub.
  • The code generator was updated to fix a bug for ignore: 404. APIs that were supposed to support this wouldn't parse the parameters correctly. The support it now: security.get_role, watcher.delete_watch
  • cluster.get_component_template, indices.get_data_stream, indices.get_index_template, indices.simulate_index_template, indices.simulate_template - Add include_defaults (Boolean) parameter: Return all default configurations for the component template (default: false).
  • machine_learning.put_trained_model - Adds wait_for_completion (Boolean) parameter: Whether to wait for all child operations(e.g. model download) to complete, before returning or not (default: false).
  • machine_learning.start_trained_model_deployment - Adds deployiment_id (String) parameter: The Id of the new deployment. Defaults to the model_id if not set.
  • search - Adds include_named_queries_score (Boolean) parameter: Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false).
  • transform.delete_transform - Adds delete_dest_index (Boolean) parameter: When true, the destination index is deleted together with the transform. The default value is false, meaning that the destination index will not be deleted.

v8.7.1

Compare Source

API Bugfix
  • Updates logstash.get_pipeline, fixed in the specification id is not a required parameter, so removes raising ArgumentError when id is not present.

v8.7.0

Compare Source

  • Tested versions of Ruby for 8.7.0: Ruby (MRI) 2.7, 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. Ruby 2.7's end of life is coming in a few days, so this'll probably be the last release to test for Ruby 2.7.
New APIs
  • health_report - Returns the health of the cluster.
  • transform.schedule_now_transform - Schedules now a transform.
API Changes
  • transform.get_transform_stats - Adds timeout (Time) parameter. Controls the time to wait for the stats.
  • transform.start_transform - Adds from (String) parameter. Restricts the set of transformed entities to those changed after this time.
  • ml.delete_job, ml.reset_job - Add delete_user_annotations (Boolean) parameter. Should annotations added by the user be deleted.
  • ml.clear_trained_model_deployment_cache, ml.infer_trained_model, ml.put_trained_model_definition_part, ml.put_trained_model_vocabulary, ml.start_trained_model_deployment, ml.stop_trained_model_deployment - These APIs are no longer in Beta.

v8.6.0

Compare Source

  • Tested versions of Ruby for 8.6.0: Ruby (MRI) 2.7, 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4.
New APIs
  • update_trained_model_deployment - Updates certain properties of trained model deployment (This functionality is in Beta and is subject to change).
API Changes
  • cluster.reroute - :metric parameter adds none as an option.
  • ml.start_trained_model_deployment - New parameter :priority (String), the deployment priority

v8.5.2

Compare Source

API Bugfix

Fixes security.create_service_token API, uses POST when token name isn't present.
Thanks @​carlosdelest for reporting in #​1961.

v8.5.1

Compare Source

Bugfix

Fixes bug when instantiating client with api_key: When passing in api_key and transport_options that don't include headers to the client, the api_key code would overwrite the arguments passed in for transport_options. This was fixed in this Pull Request.
Thanks svdasein for reporting in #​1940.

v8.5.0

Compare Source

  • Tested versions of Ruby for 8.5.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3.
Client

With the latest release of elastic-transport - v8.1.0 - this gem now supports Faraday v2. Elasticsearch Ruby has an open dependency on elastic-transport ('elastic-transport', '~> 8'), so when you upgrade your gems, 8.1.0 will be installed. This supports both Faraday v1 and Faraday v2. The main change on dependencies when using Faraday v2 is all adapters, except for the default net_http one, have been moved out of Faraday into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile.

These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based:

v8.4.0

Compare Source

  • Tested versions of Ruby for 8.4.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3.
API
New APIs
  • security.update_api_key - Updates attributes of an existing API key. Documentation.
API Changes
  • get - Adds new parameter force_synthetic_source (Boolean) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
  • machine_learning.start_trained_model_deployment - Adds new parameter cache_size (String) A byte-size value for configuring the inference cache size. For example, 20mb.
  • mget - Adds new parameter force_synthetic_source (Boolean) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
  • search - Adds new parameter force_synthetic_source (Boolean) Should this request force synthetic _source? Use this to test if the mapping supports synthetic _source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index.
  • snapshot.get - Adds new parameters:
    • sort (String) Allows setting a sort order for the result. Defaults to start_time (options: start_time, duration, name, repository, index_count, shard_count, failed_shard_count).
    • size (Integer) Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit.
    • order (String) Sort order (options: asc, desc).
    • from_sort_value (String) Value of the current sort column at which to start retrieval.
    • after (String) Offset identifier to start pagination from as returned by the 'next' field in the response body.
    • offset (Integer) Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0.
    • slm_policy_filter (String) Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '_none' to match snapshots without an SLM policy.

v8.3.0

Compare Source

  • Tested versions of Ruby for 8.3.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3.
API
  • Added build hash to auto generated code. The code generator obtains the git hash from the Elasticsearch specification and adds it as a comment in the code. This allows us to track the version for each generated class.
  • Updated for compatibility with Elasticsearch 8.3's API.
API Changes
  • cluster.delete_voting_config_exclusions, cluster.post_voting_config_exclusions - Add new parameter master_timeout (Time) Timeout for submitting request to master.
  • machine_learning.infer_trained_model_deployment is renamed to machine_learning.infer_trained_model. The url /_ml/trained_models/{model_id}/deployment/_infer is deprecated since 8.3, use /_ml/trained_models/{model_id}/_infer instead.
  • machine_learning.preview_datafeed - Adds new parameters:
    • start (String) The start time from where the datafeed preview should begin
    • end (String) The end time when the datafeed preview should stop
  • machine_learning.start_trained_model_deployment - Adds new parameters:
    • number_of_allocations (Integer) The number of model allocations on each node where the model is deployed.
    • threads_per_allocation (Integer) The number of threads used by each model allocation during inference.
    • queue_capacity (Integer) Controls how many inference requests are allowed in the queue at a time.
  • search_mvt - Adds new parameter: with_labels (Boolean) If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features
  • snapshot.get - Adds new parameter: index_names (Boolean) Whether to include the name of each index in the snapshot. Defaults to true.
New Experimental APIs
  • security.has_privileges_user_profile Determines whether the users associated with the specified profile IDs have all the requested privileges

v8.2.2

Compare Source

  • Updates dependency on elastic-transport to ~> 8.0

v8.2.0

Compare Source

  • Tested versions of Ruby for 8.2.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3.
API

Updated for compatibility with Elasticsearch 8.2's API.

New parameters:
  • field_caps
    • filters An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent
    • types Only return results for fields that have one of the types in the list
New APIs:
  • cat.component_templates - Returns information about existing component_templates templates.
  • ml.get_memory_stats - Returns information on how ML is using memory.
New Experimental APIs:
  • security.activate_user_profile - Creates or updates the user profile on behalf of another user.
  • security.disable_user_profile - Disables a user profile so it's not visible in user profile searches.
  • security.enable_user_profile - Enables a user profile so it's visible in user profile searches.
  • security.get_user_profile - Retrieves a user profile for the given unique ID.
  • security.suggest_user_profiles - Get suggestions for user profiles that match specified search criteria.
  • security.update_user_profile_data - Update application specific data for the user profile of the given unique ID.

v8.1.2

Compare Source

API
  • Fixes an issue with the generated API code. When updating the code generator for 8.x, the order of arguments.clone in the generated code was changed. This would make it so that we would modify the parameters passed in before cloning them, which is undesired. Issue: #​1727.

v8.1.0

Compare Source

  • Tested versions of Ruby for 8.1.0: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3.
API

Updated for compatibility with Elasticsearch 8.1's API.

New parameters:
  • indices.forcemerge - wait_for_completion Should the request wait until the force merge is completed.
  • indices.get - features Return only information on specified index features (options: aliases, mappings, settings).
  • ingest.put_pipeline if_version (Integer), required version for optimistic concurrency control for pipeline updates.
  • ml.delete_trained_model - timeout controls the amount of time to wait for the model to be deleted. force (Boolean) true if the model should be forcefully deleted.
  • ml.stop_trained_model_deployment - allow_no_match whether to ignore if a wildcard expression matches no deployments. (This includes _all string or when no deployments have been specified). force true if the deployment should be forcefully stopped. Adds body parameter, the stop deployment parameters.
  • nodes.hot_threads - sort the sort order for 'cpu' type (default: total) (options: cpu, total)
Updated parameters:
  • indices.get_index_template - name is now a String, a pattern that returned template names must match.

  • knn_search - index removes option to use empty string to perform the operation on all indices.

  • ml.close_job, ml.get_job_stats, ml.get_jobs, ml.get_overall_buckets - Remove allow_no_jobs parameter.

  • ml.get_datafeed_stats, ml.get_datafeeds - Remove allow_no_datafeeds parameter.

  • nodes.hot_threads - type parameter adds mem option.

  • nodes.info - metric updated to use _all to retrieve all metrics and _none to retrieve the node identity without any additional metrics. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest, indices, aggregations, _all, _none). index_metric option shards changes to shard_stats.

  • open_point_in_time - keep_alive is now a required parameter.

  • search_mvt - grid_type parameter adds centroid option in addition to grid and point.

  • New experimental APIs, designed for internal use by the fleet server project: fleet.search, fleet.msearch.

New APIs
  • OpenID Connect Authentication: security.oidc_authenticate, security.oidc_logout, security.oidc_prepare_authentication.
  • transform.reset_transform.

v8.0.1

Compare Source

API
  • Fixes an issue with the generated API code. When updating the code generator for 8.x, the order of arguments.clone in the generated code was changed. This would make it so that we would modify the parameters passed in before cloning them, which is undesired. Issue: #​1727.

v8.0.0

Compare Source

First release for the 8.x branch with a few major changes.

  • Tested versions of Ruby for 8.0.0: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3.
Client
Elastic Transport

The code for the dependency elasticsearch-transport has been promoted to its own repository and the project and gem have been renamed to elastic-transport. This gem now powers elasticsearch and elastic-enterprise-search. The elasticsearch-transport gem won't be maintained after the last release in the 7.x branch, in favour of elastic-transport.

This will allow us to better address maintainance in both clients and the library itself.

API

The elasticsearch-api library has been generated based on the Elasticsearch 8.0.0 REST specification.

X-Pack Deprecation

X-Pack has been deprecated. The elasticsearch-xpack gem will no longer be maintained after the last release in the 7.x branch. The "X-Pack" integration library codebase was merged into elasticsearch-api. All the functionality is available from elasticsearch-api. The xpack namespace was removed for accessing any APIs other than _xpack (client.xpack.info) and _xpack/usage (client.xpack.usage). But APIs which were previously available through the xpack namespace e.g.: client.xpack.machine_learning are now only available directly: client.machine_learning.

Parameter checking was removed

The code in elasticsearch-api will no longer validate all the parameters sent. It will only validate the required parameters such as those needed to build the path for the request. But other API parameters are going to be validated by Elasticsearch. This provides better forwards and backwards compatibility in the client.

Response object

In previous versions of the client, calling an API endpoint would return the JSON body of the response. With 8.0, we are returning a new Response object Elasticsearch::API::Response. It still behaves like a Hash to maintain backwards compatibility, but adds the status and headers methods from the Elastic::Transport:Transport::Response object:

elastic_ruby(main)> response = client.info
=> #<Elasticsearch::API::Response:0x000055752b0c50a8
 @&#8203;response=
  #<Elastic::Transport::Transport::Response:0x000055752b0c50f8
   @&#8203;body=
    {"name"=>"instance",
     "cluster_name"=>"elasticsearch-8-0-0-SNAPSHOT-rest-test",
     "cluster_uuid"=>"oIfRARuYRGuVYybjxQJ87w",
     "version"=>
      {"number"=>"8.0.0-SNAPSHOT",
       "build_flavor"=>"default",
       "build_type"=>"docker",
       "build_hash"=>"7e23c54eb31cc101d1a4811b9ab9c4fd33ed6a8d",
       "build_date"=>"2021-11-04T00:21:32.464485627Z",
       "build_snapshot"=>true,
       "lucene_version"=>"9.0.0",
       "minimum_wire_compatibility_version"=>"7.16.0",
       "minimum_index_compatibility_version"=>"7.0.0"},
     "tagline"=>"You Know, for Search"},
   @&#8203;headers={"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"},
   @&#8203;status=200>>
elastic_ruby(main)> response.status
=> 200
elastic_ruby(main)> response.headers
=> {"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"}
elastic_ruby(main)> response['name']
=> "instance"
elastic_ruby(main)> response['tagline']
=> "You Know, for Search"

Please let us know if you find any issues.

v7.17.10

Compare Source

Backports support for Faraday 2 from elastic-transport. ¡Gracias santiagorodriguez96!

This version of the gem now supports Faraday v2. If you don't have a locked version of Faraday in your project, when you upgrade your gems, Faraday v2 will be installed. The main change on dependencies when using Faraday v2 is all adapters, except for the default net_http one, have been moved out of Faraday into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile.

These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based:


### HTTPCLient
gem 'faraday-httpclient'

### NetHTTPPersistent
gem 'faraday-net_http_persistent'

### Patron
gem 'faraday-patron'

### Typhoeus
gem 'faraday-typhoeus'

Things should work fine if you migrate to Faraday 2 as long as you include the adapter (unless you're using the default one net-http), but worst case scenario, you can always lock the version of Faraday in your project to 1.x:
gem 'faraday', '~> 1'

Be aware if migrating to Faraday v2 that it requires at least Ruby 2.6, unlike Faraday v1 which requires 2.4.

Troubleshooting

If you see a message like:
:adapter is not registered on Faraday::Adapter (Faraday::Error)
Then you probably need to include the adapter library in your gemfile and require it.

Please submit an issue if you encounter any problems.

v7.17.9

Compare Source

  • Backports fix from elastic-transport: #​66 - Manticore transport unable to send custom headers with perform_request Pull Request.

v7.17.8

Compare Source

  • Patch releases back to being detached from Elastic stack releases.
  • Tested compatibility with Elasticsearch v7.17 APIs.
  • Tested versions of Ruby for 7.17.8: Ruby (MRI) 2.7, 3.0, 3.1, 3.2, JRuby 9.3, JRuby 9.4.
  • Bugfix in elasticsearch-transport: Fixes enforcing UTF-8 in Response body, causing an error when the string is frozen, particularly when using webmock: issue #​63.

v7.17.7: 7.17.7

Compare Source

  • Compatibility with Elasticsearch v7.17.7 APIs.
  • Tested versions of Ruby for 7.17.7: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3.

v7.17.1: 7.17.1

Compare Source

  • Improves handling of YAML parsing, uses safe_load instead of load when doing the product verification (should only affect Ruby < 3.0).
  • Updates headers setup when using the Manticore adapter. This fixes an issue where the user-agent header was being foverridden even when it was being set on initialization via the transport options. Pull Request, issue.

v7.17.0: 7.17.0

Compare Source

  • Drops Ruby 2.5 from the test matrix. Support for Ruby 2.5 was dropped March 2021.
  • Updates the product verification when the response is a 413 error.

v7.16.3: 7.16.3

Compare Source

API

Bugfix for #​1475, an issue where if you indexed a document with an id such as an id, it would get escaped to an+id instead of an%20id when using index or create. This would result in the document id being an+id instead of the intended value an id.

v7.16.1

Compare Source

Patch release corresponding with Elastic Stack version 7.16.1 that addresses the Apache Log4j2 vulnerability, more information.

Client

The only changes in the client since 7.16.0 are a few minor updates for the Compatibility mode with 8.0. We added the compatibility header in 7.13.0, but now we have integration tests and compatibility tests for version 7.x of the client with Elasticsearch 8.0.

v7.16.0: 7.16.0

Compare Source

7.16.0

Client
  • Adds the delay_on_retry parameter, a value in milliseconds to wait between each failed connection, thanks DinoPullerUqido! Pull Request and backport.
  • Adds CA fingerprinting. You can configure the client to only trust certificates that are signed by a specific CA certificate (CA certificate pinning) by providing a ca_fingerprint option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value:
ca_fingerprint = '64F2593F...'
client = Elasticsearch::Client.new(
  host: 'https://elastic:changeme@localhost:9200',
  transport_options: { ssl: { verify: false } },
  ca_fingerprint: ca_fingerprint
)

The verification will be run once per connection.

  • Fixes compression. When compression is set to true, the client will now gzip the request body properly and use the appropiate headers. Thanks johnnyshields! Pull Request and backport.
API
Updates
  • Cleaned up some deprecated code.
  • count - The API is documented as using GET, but it supports both GET and POST on the Elasticsearch side. So it was updated to only use POST when there's a body present, or else use GET. Elasticsearch would still accept a body with GET, but to be more semantically correct in the clients we use POST when there's a body.
  • delete_index_template was updated to support the ignore_404 parameter to ignore 404 errors when attempting to delete a non-existing template.
  • ingest.put_pipeline adds new parameter if_version: Required version for optimistic concurrency control for pipeline updates.
  • ml.put_trained_model: adds new parameter defer_definition_decompression: If set to true and a compressed_definition is provided, the request defers definition decompression and skips relevant validations.
  • nodes.hot_threads adds new parameter sort: The sort order for 'cpu' type (default: total) (options: cpu, total).
  • open_point_in_time: keep_alive is now a required parameter.
  • search_mvt: adds new parameter track_total_hits: Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
  • transform.preview_transform: adds new parameter transform_id. Body is now optional and the API will use GET or POST depending on the presence of a body.
APIs promoted from experimental to stable since last version:
  • fleet.global_checkpoints
  • get_script_context
  • get_script_language
  • indices.resolve_index
  • monitoring.bulk
  • rank_eval
  • searchable_snapshots.mount
  • searchable_snapshots.stats
  • security.clear_cached_service_tokens
  • security.create_service_token
  • security.delete_service_token
  • security.get_service_accounts
  • security.get_service_credentials
  • shutdown.delete_node
  • shutdown.get_node
  • shutdown.put_node
  • terms_enum
New APIs
  • fleet.mseach
  • fleet.search
  • indices.modify_data_stream
  • ml.infer_trained_model_deployment
  • ml.start_trained_model_deployment
  • ml.stop_trained_model_deployment
  • migration.get_feature_upgrade_status
  • migration.post_feature_upgrade_status
  • security.enroll_kibana
  • security.enroll_node
  • transform.updgrade_transforms

v7.15.0: 7.15.0

Compare Source

7.15.0

Client
  • Compatibility with Elasticsearch v7.15.0 APIs.
  • We've tested and added documentation on best practices for leveraging the client in a Function-as-a-Service (FaaS) environment to the official docs.
API
  • New experimental endpoints: indices.disk_usage. indices.field_usage_stats, nodes.clear_repositories_metering_archive, get_repositories_metering_info, search_mvt
  • The index parameter is now required for open_point_in_time.
  • The index_metric parameter in nodes.stats adds the shards option.
X-Pack
  • New parameters for ml.put_job: ignore_unavailable, allow_no_indices, ignore_throttled, expand_wildcards.
  • New endpoint: security.query_api_keys.

v7.14.1: 7.14.1

Compare Source

Client

v7.14.0: 7.14.0

Compare Source

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
 @&#8203;body=
  {"name"=>"instance",
   "cluster_name"=>"elasticsearch",
   "cluster_uuid"=>"id",
   "version"=>
    {"number"=>"7.14.0-SNAPSHOT",
    ...
    },
   "tagline"=>"You Know, for Search"},
 @&#8203;headers=
  {"content-type"=>"application/json; charset=UTF-8",
   "content-length"=>"571",
   ...
   },
 @&#8203;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.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Update | Change | |---|---|---| | [elasticsearch](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html) ([source](https://github.com/elastic/elasticsearch-ruby), [changelog](https://github.com/elastic/elasticsearch-ruby/blob/main/CHANGELOG.md)) | major | `'>= 7', '< 7.14'` -> `'>= 7', '< 8.13.1'` | --- ### Release Notes <details> <summary>elastic/elasticsearch-ruby (elasticsearch)</summary> ### [`v8.13.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#8130-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.12.2...v8.13.0) ##### Client - Tested versions of Ruby for 8.13.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. ##### Experimental ES|QL Helper This version provides a new experimental Helper for the ES|QL `query` API. Please check out [the documentation](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html#esql-helper) and [open an issue](https://github.com/elastic/elasticsearch-ruby/issues/new/choose) if you encounter any problems or have any feedback. ##### API API Changes: - `async_search.status` - adds Time `:keep_alive` parameter: Specify the time interval in which the results (partial or final) for this search will be available. - `bulk` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. - `connector.list` - Adds the following parameters: - `:index_name` (List): A comma-separated list of connector index names to fetch connector documents for. - `:connector_name` (List): A comma-separated list of connector names to fetch connector documents for. - `:service_type` (List): A comma-separated list of connector service types to fetch connector documents for. - `:query` (String): A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names. - `esql.query` - adds boolean `:drop_null_columns` parameter: Should entirely null columns be removed from the results? Their name and type will be returning in a new `all_columns` section. - `field_caps` - Adds `:include_empty_fields` boolean parameter: Include empty fields in result. - `index` - adds boolean `:require_data_stream` parameter: When true, requires the destination to be a data stream (existing or to-be-created). Default is false. - `indices.rollover` - adds boolean `:lazy` parameter: If set to true, the rollover action will only mark a data stream to signal that it needs to be rolled over at the next write. Only allowed on data streams. - connector_sync_job.list - adds List `:job_type` parameter: A comma-separated list of job types. - `inference.delete_model`, `inference.get_model`, `inference.inference`, `inference.put_model`: renames `:model_id` parameter to `:inference_id`. - `termvector` will show a warning since it's been deprecated. Please use the plural version, `termvectors`. New APIs: - `indices.resolve_cluster` - Resolves the specified index expressions to return information about each cluster, including the local cluster, if included. - `profiling.flamegraph` - Extracts a UI-optimized structure to render flamegraphs from Universal Profiling. - `profiling.stacktraces` - Extracts raw stacktrace information from Universal Profiling. - `security.query_user` - Retrieves information for Users using a subset of query DSL - `text_structure.test_grok_pattern` - Tests a Grok pattern on some text. APIs Migrated from experimental to stable: - `synonyms.delete_synonym` - `synonyms.delete_synonym_rule` - `synonyms.get_synonym` - `synonyms.get_synonym_rule` - `synonyms.get_synonyms_sets` - `synonyms.put_synonym` - `synonyms.put_synonym_rule` New Experimental APIs: - `connector.update_api_key_id` - Updates the API key id and/or API key secret id fields in the connector document. - `connector.update_index_name` - Updates the index name of the connector. - `connector.update_native` - Updates the is_native flag of the connector. - `connector.update_service_type` - Updates the service type of the connector. - `connector.update_status` - Updates the status of the connector. - `esql.async_query` - Executes an ESQL request asynchronously - `esql.async_query_get` - Retrieves the results of a previously submitted async query request given its ID. New Experimental namespace `connector_secret`: - `connector_secret.delete` - Deletes a connector secret. - `connector_secret.get` - Retrieves a secret stored by Connectors. - `connector_secret.post` - Creates a secret for a Connector. - `connector_secret.put` - Creates or updates a secret for a Connector. ##### Development - Migrated from `byebug` to `debug`. - Added extra testing for OpenTelemetry. ### [`v8.12.2`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v8.12.2) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.12.1...v8.12.2) Drops runtime dependency on `base64`. Thanks [Earlopain](https://github.com/Earlopain)! Pull Request: [#&#8203;2295](https://github.com/elastic/elasticsearch-ruby/pull/2295). ### [`v8.12.1`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v8.12.1) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.12.0...v8.12.1) Adds `base64` dependency: base64 was added to the gemspec, since starting in Ruby 3.4.0, base64 will no longer be part of the default gems and will no longer be in the standard library. Base64 is used for API key and Cloud ID. The dependency used to be declared in transport, but it's not needed there since the implementation using it is in this codebase. It was removed from transport in the latest patch releases: [8.1.3](https://github.com/elastic/elastic-transport-ruby/releases/tag/v8.1.3), [8.2.5](https://github.com/elastic/elastic-transport-ruby/releases/tag/v8.2.5) and [8.3.1](https://github.com/elastic/elastic-transport-ruby/releases/tag/v8.3.1). ### [`v8.12.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#8120-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.11.2...v8.12.0) ##### Client - Tested versions of Ruby for 8.12.0: Ruby (MRI) 3.0, 3.1, 3.2 and 3.3. JRuby 9.3 and JRuby 9.4. ##### API API Changes: - `bulk` - Adds boolean `:list_executed_pipelines` parameter: Sets `list_executed_pipelines` for all incoming documents. Defaults to unset (false). - `indices.put_settings` - Adds boolean `:reopen` parameter: Whether to close and reopen the index to apply non-dynamic settings. If set to `true` the indices to which the settings are being applied will be closed temporarily and then reopened in order to apply the changes. The default is `false`. - `open_point_in_time` - Adds Hash `:body` parameter: an index_filter specified with the Query DSL. - `security.get_api_key` - Adds boolean `:active_only` parameter: flag to limit response to only active (not invalidated or expired) API keys. ##### New APIs New API for [Universal profiling](https://www.elastic.co/guide/en/observability/8.12/universal-profiling.html): - `profiling.status` - Returns basic information about the status of Universal Profiling. New experimental API: - `simulate.ingest` - Simulates running ingest with example documents. See: https://www.elastic.co/guide/en/elasticsearch/reference/8.12/simulate-ingest-api.html ##### Connectors API Version 8.12 introduces the experimental [Connectors API](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/connector-apis.html). Use the following APIs to manage connectors: - `connector.post` - Creates a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html) - `connector.put` - Creates or updates a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-api.html) - `connector.delete` - Deletes a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-api.html) - `connector.get` - Returns the details about a connector. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-api.html) - `connector.list` - Lists all connectors. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-api.html) - `connector.check_in` - Updates the last_seen timestamp in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-api.html) - `connector.update_configuration` - Updates the connector configuration. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-configuration-api.html) - `connector.update_error` - Updates the error field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-error-api.html) - `connector.update_filtering` - Updates the filtering field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-filtering-api.html) - `connector.last_sync` - Updates the stats of last sync in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-last-sync-api.html) - `connector.update_name` - Updates the name and/or description fields in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-name-description-api.html) - `connector.update_pipeline` - Updates the pipeline field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-pipeline-api.html) - `connector.update_scheduling` - Updates the scheduling field in the connector document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/update-connector-scheduling-api.html) Use the following APIs to manage sync jobs: - `connector_sync_job.cancel` - Cancels a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cancel-connector-sync-job-api.html) - `connector_sync_job.check_in` - Checks in a connector sync job (refreshes 'last_seen'). See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/check-in-connector-sync-job-api.html) - `connector_sync_job.delete` - Deletes a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/delete-connector-sync-job-api.html) - `connector_sync_job.error` - Sets an error for a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-error-api.html) - `connector_sync_job.get` - Returns the details about a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/get-connector-sync-job-api.html) - `connector_sync_job.list` - Lists all connector sync jobs. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/list-connector-sync-jobs-api.html) - `connector_sync_job.post` - Creates a connector sync job. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/create-connector-sync-job-api.html) - `connector_sync_job.update_stats` - Updates the stats fields in the connector sync job document. See [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.12/set-connector-sync-job-stats-api.html) ### [`v8.11.2`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v8.11.2) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.11.1...v8.11.2) Drops runtime dependency on `base64`. Thanks [Earlopain](https://github.com/Earlopain)! Pull Request: [#&#8203;2295](https://github.com/elastic/elasticsearch-ruby/pull/2295). ### [`v8.11.1`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v8.11.1) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.11.0...v8.11.1) Adds `base64` dependency: base64 was added to the gemspec, since starting in Ruby 3.4.0, base64 will no longer be part of the default gems and will no longer be in the standard library. Base64 is used for API key and Cloud ID. The dependency used to be declared in transport, but it's not needed there since the implementation using it is in this codebase. It was removed from transport in the latest patch releases: [8.1.3](https://github.com/elastic/elastic-transport-ruby/releases/tag/v8.1.3), [8.2.5](https://github.com/elastic/elastic-transport-ruby/releases/tag/v8.2.5) and [8.3.1](https://github.com/elastic/elastic-transport-ruby/releases/tag/v8.3.1). ### [`v8.11.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#8110-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.10.0...v8.11.0) ##### Client - Tested versions of Ruby for 8.11.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. - Adds native support for *Open Telemetry*. See Open Telemetry for documentation. - Improved documentation, now you can find more examples in Ruby in the [REST API reference](https://www.elastic.co/guide/en/elasticsearch/reference/8.11/rest-apis.html). ##### API New Experimental APIs: - `esql.query` - Executes an ESQL request. - `inference.delete_model` - Delete model in the Inference API. - `inference.get_model` - Get a model in the Inference API. - `inference.inference` - Perform inference on a model. - `inference.put_model` - Configure a model for use in the Inference API. ### [`v8.10.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#8100-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.9.0...v8.10.0) ##### Client - Tested versions of Ruby for 8.10.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. ##### API ##### New Experimental APIs, for internal use: - `fleet.delete_secret` - `fleet.get_secret` - `fleet.post_secret` ##### New stable APIs: - `security.get_settings` - Retrieve settings for the security system indices - `security.update_settings` - Update settings for the security system indices ##### New Experimental API: - `query_ruleset.list` List query rulesets. ##### API Changes: - `indices.reload_search_analyzers` - Adds parameter `resource` changed resource to reload analyzers from if applicable Promoted from Experimental to Beta: - `security.create_cross_cluster_api_key` - `security.update_cross_cluster_api_key` ##### Synonyms namespace update: All synonym related APIs have been moved to the `synonyms` namespace and some of the endpoints have been renamed, as well as their parameters: - `synonyms.delete` => `synonyms.delete_synonym` - requires `id`, the id of the synonyms set to be deleted. - `synonyms.get` => `synonyms.get_synonym` - requires `id`, the name of the synonyms set to be retrieved. - `synonyms_set.get_synonyms_sets` => `synonyms.get_synonyms_sets` - `synonyms.put` => `synonyms.put_synonym` - requires `id` of the synonyms set to be created or updated. - `synonym_rule.put` => `synonyms.put_synonym_rule` - Parameters changed to `set_id` (the id of the synonym set to be updated with the synonym rule) and `rule_id` (the id of the synonym rule to be updated or created). - New Experimental API `synonyms.delete_synonym_rule` - Deletes a synonym rule in a synonym set - New Experimental API `synonyms.get_synonym_rule` - Retrieves a synonym rule from a synonym set ### [`v8.9.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#890-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.8.0...v8.9.0) ##### Client - Tested versions of Ruby for 8.9.0: Ruby (MRI) 3.0, 3.1 and 3.2. JRuby 9.3 and JRuby 9.4. - Updated product validation. The code for the product validation was refactored in a few ways: - Just check header, does not check the version of the server. - Warns only once when there's a general server error. - Removes the call to '/' (client.info) when doing the first request, checking on the first actual request from the client. - Fixes User-Agent code. In the migration to 8.x, the user agent code was extracted into transport, since we're now using that library in other projects. So for the Elasticsearch Client, the user-agent would be reported as the one defined in elastic-transport. This release fixes the issue and brings back the user agent in the format that was being used in 7.x ##### Helpers This release introduces two new Helpers in the client: - BulkHelper - This helper provides a better developer experience when using the Bulk API. At its simplest, you can send it a collection of hashes in an array, and it will bulk ingest them into {es}. - ScrollHelper - This helper provides an easy way to get results from a Scroll. See [Helpers](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/Helpers.html) to read more about them. ##### API ##### New APIs - `cluster.info` - Returns different information about the cluster. ##### New Experimental APIs and namespaces: This functionality is Experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features. - New namespace: `query_ruleset` - `query_ruleset.delete` - Deletes a query ruleset. - `query_ruleset.get` - Returns the details about a query ruleset. - `query_ruleset.put` - Creates or updates a query ruleset. - New API: `search_application.render_query` Renders a query for given search application search parameters. - New API: `security.create_cross_cluster_api_key` - Creates a cross-cluster API key for API key based remote cluster access. - New API: `security.upate_cross_cluster_api_key` - Updates attributes of an existing cross-cluster API key. - New namespace: `synonyms` - `synonyms.delete`- Deletes a synonym set - `synonyms.get` - Retrieves a synonym set - `synonyms.put` - Creates or updates a synonyms set - New namespace: `synonym_rule` - `synonym_rule.put` - Creates or updates a synonym rule in a synonym set - New namespace: `synonyms` - `synonyms_set.get` - Retrieves a summary of all defined synonym sets ### [`v8.8.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#880-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.7.1...v8.8.0) - Tested versions of Ruby for 8.8.0: Ruby (MRI) 3.0, 3.1 and **3.2**. JRuby 9.3 and JRuby 9.4. ##### API - Updates development dependency `minitest-reporters` to `>= 1.6` to include showing failures at the end of the test run. ##### New APIs - `watcher.get_settings` - Retrieve settings for the watcher system index. - `watcher.update_settings` - Update settings for the watcher system index. ##### New Experimental APIs - `indices.delete_data_lifecycle`- Deletes the data lifecycle of the selected data streams - `indices.explain_data_lifecycle` - Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc. - `indices.get_data_lifecycle` - Returns the data lifecycle of the selected data streams. - `indices.put_data_lifecycle` - Updates the data lifecycle of the selected data streams. - `search_application.delete` - Deletes a search application. - `search_application.delete_behavioral_analytics` - Delete a behavioral analytics collection. - `search_application.get` - Returns the details about a search application. - `search_application.get_behavioral_analytics` - Returns the existing behavioral analytics collections. - `search_application.list` - Returns the existing search applications. - `search_application.post_behavioral_analytics_event` - Creates a behavioral analytics event for existing collection. - `search_application.put` - Creates or updates a search application. - `search_application.put_behavioral_analytics` - Creates a behavioral analytics collection. - `search_application.search` - Perform a search against a search application. ##### API Changes - `clear_scroll` now works with the argument `ignore: 404`. [Issue on GitHub](https://github.com/elastic/elasticsearch-ruby/issues/2067). - The code generator was updated to fix a bug for `ignore: 404`. APIs that were supposed to support this wouldn't parse the parameters correctly. The support it now: `security.get_role`, `watcher.delete_watch` - `cluster.get_component_template`, `indices.get_data_stream`, `indices.get_index_template`, `indices.simulate_index_template`, `indices.simulate_template` - Add `include_defaults` (Boolean) parameter: Return all default configurations for the component template (default: false). - `machine_learning.put_trained_model` - Adds `wait_for_completion` (Boolean) parameter: Whether to wait for all child operations(e.g. model download) to complete, before returning or not (default: false). - `machine_learning.start_trained_model_deployment` - Adds `deployiment_id` (String) parameter: The Id of the new deployment. Defaults to the model_id if not set. - `search` - Adds `include_named_queries_score` (Boolean) parameter: Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false). - `transform.delete_transform` - Adds `delete_dest_index` (Boolean) parameter: When `true`, the destination index is deleted together with the transform. The default value is `false`, meaning that the destination index will not be deleted. ### [`v8.7.1`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#871-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.7.0...v8.7.1) ##### API Bugfix - Updates `logstash.get_pipeline`, fixed in the specification `id` is not a required parameter, so removes raising `ArgumentError` when id is not present. ### [`v8.7.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#870-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.6.0...v8.7.0) - Tested versions of Ruby for 8.7.0: Ruby (MRI) 2.7, 3.0, 3.1 and **3.2**. JRuby 9.3 and JRuby 9.4. Ruby 2.7's end of life is coming in a few days, so this'll probably be the last release to test for Ruby 2.7. ##### New APIs - `health_report` - Returns the health of the cluster. - `transform.schedule_now_transform` - Schedules now a transform. ##### API Changes - `transform.get_transform_stats` - Adds `timeout` (Time) parameter. Controls the time to wait for the stats. - `transform.start_transform` - Adds `from` (String) parameter. Restricts the set of transformed entities to those changed after this time. - `ml.delete_job`, `ml.reset_job` - Add `delete_user_annotations` (Boolean) parameter. Should annotations added by the user be deleted. - `ml.clear_trained_model_deployment_cache`, `ml.infer_trained_model`, `ml.put_trained_model_definition_part`, `ml.put_trained_model_vocabulary`, `ml.start_trained_model_deployment`, `ml.stop_trained_model_deployment` - These APIs are no longer in Beta. ### [`v8.6.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#860-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.5.2...v8.6.0) - Tested versions of Ruby for 8.6.0: Ruby (MRI) 2.7, 3.0, 3.1 and **3.2**. JRuby 9.3 and **JRuby 9.4**. ##### New APIs - `update_trained_model_deployment` - Updates certain properties of trained model deployment (This functionality is in Beta and is subject to change). ##### API Changes - `cluster.reroute` - `:metric` parameter adds `none` as an option. - `ml.start_trained_model_deployment` - New parameter `:priority` (String), the deployment priority ### [`v8.5.2`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#852-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.5.1...v8.5.2) ##### API Bugfix Fixes `security.create_service_token` API, uses `POST` when token name isn't present. Thanks [@&#8203;carlosdelest](https://github.com/carlosdelest) for reporting in [#&#8203;1961](https://github.com/elastic/elasticsearch-ruby/pull/1961). ### [`v8.5.1`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#851-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.5.0...v8.5.1) ##### Bugfix Fixes bug when instantiating client with `api_key`: When passing in `api_key` and `transport_options` that don't include headers to the client, the `api_key` code would overwrite the arguments passed in for `transport_options`. This was fixed in [this Pull Request](https://github.com/elastic/elasticsearch-ruby/pull/1941/files). Thanks [svdasein](https://github.com/svdasein) for reporting in [#&#8203;1940](https://github.com/elastic/elasticsearch-ruby/issues/1940). ### [`v8.5.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#850-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.4.0...v8.5.0) - Tested versions of Ruby for 8.5.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. ##### Client With the latest release of `elastic-transport` - `v8.1.0` - this gem now supports Faraday v2. Elasticsearch Ruby has an open dependency on `elastic-transport` (`'elastic-transport', '~> 8'`), so when you upgrade your gems, `8.1.0` will be installed. This supports both Faraday v1 and Faraday v2. The main change on dependencies when using Faraday v2 is all adapters, except for the default `net_http` one, have been moved out of Faraday into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile. These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based: ``` ``` ### [`v8.4.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#840-Release-Notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.3.0...v8.4.0) - Tested versions of Ruby for 8.4.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. ##### API ##### New APIs - `security.update_api_key` - Updates attributes of an existing API key. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.4/security-api-update-api-key.html). ##### API Changes - `get` - Adds new parameter `force_synthetic_source` (Boolean) Should this request force synthetic \_source? Use this to test if the mapping supports synthetic \_source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. - `machine_learning.start_trained_model_deployment` - Adds new parameter `cache_size` (String) A byte-size value for configuring the inference cache size. For example, 20mb. - `mget` - Adds new parameter `force_synthetic_source` (Boolean) Should this request force synthetic \_source? Use this to test if the mapping supports synthetic \_source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. - `search` - Adds new parameter `force_synthetic_source` (Boolean) Should this request force synthetic \_source? Use this to test if the mapping supports synthetic \_source and to get a sense of the worst case performance. Fetches with this enabled will be slower the enabling synthetic source natively in the index. - `snapshot.get` - Adds new parameters: - `sort` (String) Allows setting a sort order for the result. Defaults to start_time (options: start_time, duration, name, repository, index_count, shard_count, failed_shard_count). - `size` (Integer) Maximum number of snapshots to return. Defaults to 0 which means return all that match without limit. - `order` (String) Sort order (options: asc, desc). - `from_sort_value` (String) Value of the current sort column at which to start retrieval. - `after` (String) Offset identifier to start pagination from as returned by the 'next' field in the response body. - `offset` (Integer) Numeric offset to start pagination based on the snapshots matching the request. Defaults to 0. - `slm_policy_filter` (String) Filter snapshots by a comma-separated list of SLM policy names that snapshots belong to. Accepts wildcards. Use the special pattern '\_none' to match snapshots without an SLM policy. ### [`v8.3.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#830-Release-Notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.2.2...v8.3.0) - Tested versions of Ruby for 8.3.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. ##### API - Added build hash to auto generated code. The code generator obtains the git hash from the Elasticsearch specification and adds it as a comment in the code. This allows us to track the version for each generated class. - Updated for compatibility with Elasticsearch 8.3's API. ##### API Changes - `cluster.delete_voting_config_exclusions`, `cluster.post_voting_config_exclusions` - Add new parameter `master_timeout` (Time) Timeout for submitting request to master. - `machine_learning.infer_trained_model_deployment` is renamed to `machine_learning.infer_trained_model`. The url `/_ml/trained_models/{model_id}/deployment/_infer` is deprecated since 8.3, use `/_ml/trained_models/{model_id}/_infer` instead. - `machine_learning.preview_datafeed` - Adds new parameters: - `start` (String) The start time from where the datafeed preview should begin - `end` (String) The end time when the datafeed preview should stop - `machine_learning.start_trained_model_deployment` - Adds new parameters: - `number_of_allocations` (Integer) The number of model allocations on each node where the model is deployed. - `threads_per_allocation` (Integer) The number of threads used by each model allocation during inference. - `queue_capacity` (Integer) Controls how many inference requests are allowed in the queue at a time. - `search_mvt` - Adds new parameter: `with_labels` (Boolean) If true, the hits and aggs layers will contain additional point features with suggested label positions for the original features - `snapshot.get` - Adds new parameter: `index_names` (Boolean) Whether to include the name of each index in the snapshot. Defaults to true. ##### New Experimental APIs - `security.has_privileges_user_profile` Determines whether the users associated with the specified profile IDs have all the requested privileges ### [`v8.2.2`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#822-Release-notes) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.2.0...v8.2.2) - Updates dependency on `elastic-transport` to `~> 8.0` ### [`v8.2.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#820) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.1.2...v8.2.0) - Tested versions of Ruby for 8.2.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3. ##### API Updated for compatibility with Elasticsearch 8.2's API. ##### New parameters: - `field_caps` - `filters` An optional set of filters: can include +metadata,-metadata,-nested,-multifield,-parent - `types` Only return results for fields that have one of the types in the list ##### New APIs: - `cat.component_templates` - Returns information about existing component_templates templates. - `ml.get_memory_stats` - Returns information on how ML is using memory. ##### New Experimental APIs: - `security.activate_user_profile` - Creates or updates the user profile on behalf of another user. - `security.disable_user_profile` - Disables a user profile so it's not visible in user profile searches. - `security.enable_user_profile` - Enables a user profile so it's visible in user profile searches. - `security.get_user_profile` - Retrieves a user profile for the given unique ID. - `security.suggest_user_profiles` - Get suggestions for user profiles that match specified search criteria. - `security.update_user_profile_data` - Update application specific data for the user profile of the given unique ID. ### [`v8.1.2`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#812-801) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.1.0...v8.1.2) ##### API - Fixes an issue with the generated API code. When updating the code generator for 8.x, the order of `arguments.clone` in the generated code was changed. This would make it so that we would modify the parameters passed in before cloning them, which is undesired. Issue: [#&#8203;1727](https://github.com/elastic/elasticsearch-ruby/issues/1727). ### [`v8.1.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#810) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.0.1...v8.1.0) - Tested versions of Ruby for 8.1.0: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3. ##### API Updated for compatibility with Elasticsearch 8.1's API. ##### New parameters: - `indices.forcemerge` - `wait_for_completion` Should the request wait until the force merge is completed. - `indices.get` - `features` Return only information on specified index features (options: aliases, mappings, settings). - `ingest.put_pipeline` `if_version` (Integer), required version for optimistic concurrency control for pipeline updates. - `ml.delete_trained_model` - `timeout` controls the amount of time to wait for the model to be deleted. `force` (Boolean) true if the model should be forcefully deleted. - `ml.stop_trained_model_deployment` - `allow_no_match` whether to ignore if a wildcard expression matches no deployments. (This includes `_all` string or when no deployments have been specified). `force` true if the deployment should be forcefully stopped. Adds `body` parameter, the stop deployment parameters. - `nodes.hot_threads` - `sort` the sort order for 'cpu' type (default: total) (options: cpu, total) ##### Updated parameters: - `indices.get_index_template` - `name` is now a String, a pattern that returned template names must match. - `knn_search` - `index` removes option to use empty string to perform the operation on all indices. - `ml.close_job`, `ml.get_job_stats`, `ml.get_jobs`, `ml.get_overall_buckets` - Remove `allow_no_jobs` parameter. - `ml.get_datafeed_stats`, `ml.get_datafeeds` - Remove `allow_no_datafeeds` parameter. - `nodes.hot_threads` - `type` parameter adds `mem` option. - `nodes.info` - `metric` updated to use `_all` to retrieve all metrics and `_none` to retrieve the node identity without any additional metrics. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest, indices, aggregations, \_all, \_none). `index_metric` option `shards` changes to `shard_stats`. - `open_point_in_time` - `keep_alive` is now a required parameter. - `search_mvt` - `grid_type` parameter adds `centroid` option in addition to `grid` and `point`. - New experimental APIs, designed for internal use by the fleet server project: `fleet.search`, `fleet.msearch`. ##### New APIs - OpenID Connect Authentication: `security.oidc_authenticate`, `security.oidc_logout`, `security.oidc_prepare_authentication`. - `transform.reset_transform`. ### [`v8.0.1`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#812-801) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v8.0.0...v8.0.1) ##### API - Fixes an issue with the generated API code. When updating the code generator for 8.x, the order of `arguments.clone` in the generated code was changed. This would make it so that we would modify the parameters passed in before cloning them, which is undesired. Issue: [#&#8203;1727](https://github.com/elastic/elasticsearch-ruby/issues/1727). ### [`v8.0.0`](https://github.com/elastic/elasticsearch-ruby/blob/HEAD/CHANGELOG.md#800) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.17.10...v8.0.0) First release for the `8.x` branch with a few major changes. - Tested versions of Ruby for 8.0.0: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3. ##### Client ##### Elastic Transport The code for the dependency `elasticsearch-transport` has been promoted to [its own repository](https://github.com/elastic/elastic-transport-ruby/) and the project and gem have been renamed to [`elastic-transport`](https://rubygems.org/gems/elastic-transport). This gem now powers [`elasticsearch`](https://rubygems.org/gems/elasticsearch) and [`elastic-enterprise-search`](https://rubygems.org/gems/elastic-enterprise-search). The `elasticsearch-transport` gem won't be maintained after the last release in the `7.x` branch, in favour of `elastic-transport`. This will allow us to better address maintainance in both clients and the library itself. ##### API The `elasticsearch-api` library has been generated based on the Elasticsearch 8.0.0 REST specification. ##### X-Pack Deprecation X-Pack has been deprecated. The `elasticsearch-xpack` gem will no longer be maintained after the last release in the `7.x` branch. The "X-Pack" integration library codebase was merged into `elasticsearch-api`. All the functionality is available from `elasticsearch-api`. The `xpack` namespace was removed for accessing any APIs other than `_xpack` (`client.xpack.info`) and `_xpack/usage` (`client.xpack.usage`). But APIs which were previously available through the `xpack` namespace e.g.: `client.xpack.machine_learning` are now only available directly: `client.machine_learning`. ##### Parameter checking was removed The code in `elasticsearch-api` will no longer validate all the parameters sent. It will only validate the required parameters such as those needed to build the path for the request. But other API parameters are going to be validated by Elasticsearch. This provides better forwards and backwards compatibility in the client. ##### Response object In previous versions of the client, calling an API endpoint would return the JSON body of the response. With `8.0`, we are returning a new Response object `Elasticsearch::API::Response`. It still behaves like a Hash to maintain backwards compatibility, but adds the `status` and `headers` methods from the `Elastic::Transport:Transport::Response` object: ```ruby elastic_ruby(main)> response = client.info => #<Elasticsearch::API::Response:0x000055752b0c50a8 @&#8203;response= #<Elastic::Transport::Transport::Response:0x000055752b0c50f8 @&#8203;body= {"name"=>"instance", "cluster_name"=>"elasticsearch-8-0-0-SNAPSHOT-rest-test", "cluster_uuid"=>"oIfRARuYRGuVYybjxQJ87w", "version"=> {"number"=>"8.0.0-SNAPSHOT", "build_flavor"=>"default", "build_type"=>"docker", "build_hash"=>"7e23c54eb31cc101d1a4811b9ab9c4fd33ed6a8d", "build_date"=>"2021-11-04T00:21:32.464485627Z", "build_snapshot"=>true, "lucene_version"=>"9.0.0", "minimum_wire_compatibility_version"=>"7.16.0", "minimum_index_compatibility_version"=>"7.0.0"}, "tagline"=>"You Know, for Search"}, @&#8203;headers={"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"}, @&#8203;status=200>> elastic_ruby(main)> response.status => 200 elastic_ruby(main)> response.headers => {"X-elastic-product"=>"Elasticsearch", "content-type"=>"application/json", "content-length"=>"567"} elastic_ruby(main)> response['name'] => "instance" elastic_ruby(main)> response['tagline'] => "You Know, for Search" ``` Please [let us know if you find any issues](https://github.com/elastic/elasticsearch-ruby/issues). ### [`v7.17.10`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.17.10) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.17.9...v7.17.10) Backports support for Faraday 2 from `elastic-transport`. ¡Gracias [santiagorodriguez96](https://github.com/santiagorodriguez96)! This version of the gem now supports Faraday v2. If you don't have a locked version of Faraday in your project, when you upgrade your gems, Faraday v2 will be installed. The main change on dependencies when using Faraday v2 is all adapters, except for the default `net_http` one, have been moved out of Faraday into separate gems. This means if you're not using the default adapter and you migrate to Faraday v2, you'll need to add the adapter gems to your Gemfile. These are the gems required for the different adapters with Faraday 2, instead of the libraries on which they were based: ```ruby ### HTTPCLient gem 'faraday-httpclient' ### NetHTTPPersistent gem 'faraday-net_http_persistent' ### Patron gem 'faraday-patron' ### Typhoeus gem 'faraday-typhoeus' ``` Things should work fine if you migrate to Faraday 2 as long as you include the adapter (unless you're using the default one `net-http`), but worst case scenario, you can always lock the version of Faraday in your project to 1.x: `gem 'faraday', '~> 1'` Be aware if migrating to Faraday v2 that it requires at least Ruby `2.6`, unlike Faraday v1 which requires `2.4`. *Troubleshooting* If you see a message like: `:adapter is not registered on Faraday::Adapter (Faraday::Error)` Then you probably need to include the adapter library in your gemfile and require it. Please [submit an issue](https://github.com/elastic/elasticsearch-ruby/issues) if you encounter any problems. ### [`v7.17.9`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.17.9) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.17.8...v7.17.9) - Backports fix from `elastic-transport`: [#&#8203;66](https://github.com/elastic/elastic-transport-ruby/issues/66) - Manticore transport unable to send custom headers with `perform_request` [Pull Request](https://github.com/elastic/elastic-transport-ruby/pull/69). ### [`v7.17.8`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.17.8) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.17.7...v7.17.8) - Patch releases back to being detached from Elastic stack releases. - Tested compatibility with Elasticsearch v7.17 APIs. - Tested versions of Ruby for 7.17.8: Ruby (MRI) 2.7, 3.0, 3.1, 3.2, JRuby 9.3, JRuby 9.4. - Bugfix in elasticsearch-transport: Fixes enforcing UTF-8 in Response body, causing an error when the string is frozen, particularly when using webmock: [issue #&#8203;63](https://github.com/elastic/elastic-transport-ruby/issues/63). ### [`v7.17.7`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.17.7): 7.17.7 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.17.1...v7.17.7) - Compatibility with Elasticsearch v7.17.7 APIs. - Tested versions of Ruby for 7.17.7: Ruby (MRI) 2.6, 2.7, 3.0 and 3.1, JRuby 9.3. ### [`v7.17.1`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.17.1): 7.17.1 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.17.0...v7.17.1) - Improves handling of YAML parsing, uses `safe_load` instead of `load` when doing the product verification (should only affect Ruby < 3.0). - Updates headers setup when using the Manticore adapter. This fixes an issue where the user-agent header was being foverridden even when it was being set on initialization via the transport options. [Pull Request](https://github.com/elastic/elasticsearch-ruby/pull/1685), [issue](https://github.com/elastic/elasticsearch-ruby/issues/1684). ### [`v7.17.0`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.17.0): 7.17.0 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.16.3...v7.17.0) - Drops Ruby 2.5 from the test matrix. Support for Ruby 2.5 was dropped March 2021. - Updates the product verification when the response is a `413` error. ### [`v7.16.3`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.16.3): 7.16.3 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.16.1...v7.16.3) ##### API Bugfix for [#&#8203;1475](https://github.com/elastic/elasticsearch-ruby/issues/1475), an issue where if you indexed a document with an id such as `an id`, it would get escaped to `an+id` instead of `an%20id` when using `index` or `create`. This would result in the document id being `an+id` instead of the intended value `an id`. ### [`v7.16.1`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.16.1) [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.16.0...v7.16.1) Patch release corresponding with Elastic Stack version 7.16.1 that addresses the Apache Log4j2 vulnerability, [more information](https://discuss.elastic.co/t/apache-log4j2-remote-code-execution-rce-vulnerability-cve-2021-44228-esa-2021-31/291476). ##### Client The only changes in the client since 7.16.0 are a few minor updates for the [Compatibility mode with 8.0](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/connecting.html#client-comp). We added the compatibility header in `7.13.0`, but now we have integration tests and compatibility tests for version `7.x` of the client with Elasticsearch `8.0`. ### [`v7.16.0`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.16.0): 7.16.0 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.15.0...v7.16.0) #### 7.16.0 ##### Client - Adds the `delay_on_retry` parameter, a value in milliseconds to wait between each failed connection, thanks [DinoPullerUqido](https://github.com/DinoPullerUqido)! [Pull Request](https://github.com/elastic/elasticsearch-ruby/pull/1521) and [backport](https://github.com/elastic/elasticsearch-ruby/pull/1523). - Adds *CA fingerprinting*. You can configure the client to only trust certificates that are signed by a specific CA certificate (CA certificate pinning) by providing a `ca_fingerprint` option. This will verify that the fingerprint of the CA certificate that has signed the certificate of the server matches the supplied value: ```ruby ca_fingerprint = '64F2593F...' client = Elasticsearch::Client.new( host: 'https://elastic:changeme@localhost:9200', transport_options: { ssl: { verify: false } }, ca_fingerprint: ca_fingerprint ) ``` The verification will be run once per connection. - Fixes compression. When `compression` is set to `true`, the client will now gzip the request body properly and use the appropiate headers. Thanks [johnnyshields](https://github.com/johnnyshields)! [Pull Request](https://github.com/elastic/elasticsearch-ruby/pull/1478) and [backport](https://github.com/elastic/elasticsearch-ruby/pull/1526). ##### API ##### Updates - Cleaned up some deprecated code. - `count` - The API is documented as using `GET`, but it supports both GET and POST on the Elasticsearch side. So it was updated to only use `POST` when there's a body present, or else use `GET`. Elasticsearch would still accept a body with `GET`, but to be more semantically correct in the clients we use `POST` when there's a body. - `delete_index_template` was updated to support the `ignore_404` parameter to ignore 404 errors when attempting to delete a non-existing template. - `ingest.put_pipeline` adds new parameter `if_version`: Required version for optimistic concurrency control for pipeline updates. - `ml.put_trained_model`: adds new parameter `defer_definition_decompression`: If set to `true` and a `compressed_definition` is provided, the request defers definition decompression and skips relevant validations. - `nodes.hot_threads` adds new parameter `sort`: The sort order for 'cpu' type (default: total) (options: cpu, total). - `open_point_in_time`: `keep_alive` is now a required parameter. - `search_mvt`: adds new parameter `track_total_hits`: Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number. - `transform.preview_transform`: adds new parameter `transform_id`. Body is now optional and the API will use `GET` or `POST` depending on the presence of a body. ##### APIs promoted from experimental to stable since last version: - `fleet.global_checkpoints` - `get_script_context` - `get_script_language` - `indices.resolve_index` - `monitoring.bulk` - `rank_eval` - `searchable_snapshots.mount` - `searchable_snapshots.stats` - `security.clear_cached_service_tokens` - `security.create_service_token` - `security.delete_service_token` - `security.get_service_accounts` - `security.get_service_credentials` - `shutdown.delete_node` - `shutdown.get_node` - `shutdown.put_node` - `terms_enum` ##### New APIs - `fleet.mseach` - `fleet.search` - `indices.modify_data_stream` - `ml.infer_trained_model_deployment` - `ml.start_trained_model_deployment` - `ml.stop_trained_model_deployment` - `migration.get_feature_upgrade_status` - `migration.post_feature_upgrade_status` - `security.enroll_kibana` - `security.enroll_node` - `transform.updgrade_transforms` ### [`v7.15.0`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.15.0): 7.15.0 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.14.1...v7.15.0) #### 7.15.0 ##### Client - Compatibility with Elasticsearch v7.15.0 APIs. - We've tested and added documentation on best practices for leveraging the client in a Function-as-a-Service (FaaS) environment to the [official docs](https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/connecting.html#client-faas). ##### API - New experimental endpoints: `indices.disk_usage`. `indices.field_usage_stats`, `nodes.clear_repositories_metering_archive`, `get_repositories_metering_info`, [`search_mvt`](https://www.elastic.co/guide/en/elasticsearch/reference/master/search-vector-tile-api.html) - The `index` parameter is now required for `open_point_in_time`. - The `index_metric` parameter in `nodes.stats` adds the `shards` option. ##### X-Pack - New parameters for `ml.put_job`: `ignore_unavailable`, `allow_no_indices`, `ignore_throttled`, `expand_wildcards`. - New endpoint: [`security.query_api_keys`](https://www.elastic.co/guide/en/elasticsearch/reference/7.15/security-api-query-api-key.html). ### [`v7.14.1`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.14.1): 7.14.1 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.14.0...v7.14.1) ##### Client - Fixes for Manticore Implementation: Addresses custom headers on initialization (https://github.com/elastic/elasticsearch-ruby/commit/3732dd4f6de75365460fa99c1cd89668b107ef1c) and fixes tracing (https://github.com/elastic/elasticsearch-ruby/commit/3c48ebd9a783988d1f71bfb9940459832ccd63e4). Related to [#&#8203;1426](https://github.com/elastic/elasticsearch-ruby/issues/1426) and [#&#8203;1428](https://github.com/elastic/elasticsearch-ruby/issues/1428). ### [`v7.14.0`](https://github.com/elastic/elasticsearch-ruby/releases/tag/v7.14.0): 7.14.0 [Compare Source](https://github.com/elastic/elasticsearch-ruby/compare/v7.14.0.pre...v7.14.0) ##### 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: ```ruby > 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: ```ruby > 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: ```ruby > client.perform_request('GET', '/') ### This is the same as doing client.transport.perform_request('GET', '/') => #<Elasticsearch::Transport::Transport::Response:0x000055c80bf94bc8 @&#8203;body= {"name"=>"instance", "cluster_name"=>"elasticsearch", "cluster_uuid"=>"id", "version"=> {"number"=>"7.14.0-SNAPSHOT", ... }, "tagline"=>"You Know, for Search"}, @&#8203;headers= {"content-type"=>"application/json; charset=UTF-8", "content-length"=>"571", ... }, @&#8203;status=200> ``` If you have any problems, please report them in [this issue](https://github.com/elastic/elasticsearch-ruby/issues/1344). ##### API Code is now generated from Elastic artifacts instead of checked out code of Elasticsearch. See [the Generator README](https://github.com/elastic/elasticsearch-ruby/blob/7.14/elasticsearch-api/utils/README.md#generate) 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](https://github.com/elastic/elasticsearch-ruby/issues/1274) 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. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy42OC40IiwidXBkYXRlZEluVmVyIjoiMzcuMjY3LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->
renovate added the
renovate
label 2023-12-11 19:06:47 +00:00
renovate force-pushed renovate/elasticsearch-8.x from 7b64a03f57 to 4d53c58b3c 2023-12-13 19:48:49 +00:00 Compare
renovate force-pushed renovate/elasticsearch-8.x from 4d53c58b3c to 9030afa09d 2024-01-18 03:04:55 +00:00 Compare
renovate force-pushed renovate/elasticsearch-8.x from 9030afa09d to cae82dda4d 2024-01-26 03:05:42 +00:00 Compare
renovate force-pushed renovate/elasticsearch-8.x from cae82dda4d to 03f9046890 2024-02-07 03:07:15 +00:00 Compare
renovate force-pushed renovate/elasticsearch-8.x from 03f9046890 to df4286d1ab 2024-04-04 03:03:28 +00:00 Compare
stefan closed this pull request 2024-04-25 15:08:32 +00:00
All checks were successful
ZeroDownTime/fluentd-concenter/pipeline/pr-main This commit looks good

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
renovate
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ZeroDownTime/fluentd-concenter#2
No description provided.