Releases: elastic/elasticsearch-ruby
8.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.
Thanks svdasein for reporting in #1940.
8.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:
# 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.
API
New APIs
machine_learning.clear_trained_model_deployment_cache
- Clear the cached results from a trained model deployment (Beta).security.bulk_update_api_keys
- Updates the attributes of multiple existing API keys.
API Changes
-
rollup.rollup
renamed toindices.downsample
. The method now receives theindex
to downsample (Required) and instead ofrollup_index
, use target_index as the index to store downsampled data. -
security.get_api_key
andsecurity.query_api_keys
add:with_limited_by
flag to show the limited-by role descriptors of API Keys. -
security.get_user
adds:with_profile_uid
flag to retrieve profile uid (if exists) associated to the user. -
security.get_user_profile
now retrieves user profiles for given unique ID(s).:uid
is now a list of comma-separated list of unique identifier for user profiles. -
text_structure.find_structure
adds:ecs_compatibility
, optional parameter to specify the compatibility mode with ECS Grok patterns - may be either 'v1' or 'disabled'.
Machine learning APIs promoted from Experimental to Beta:
machine_learning.clear_trained_model_deployment_cache.rb
machine_learning.infer_trained_model.rb
machine_learning.put_trained_model_definition_part.rb
machine_learning.put_trained_model_vocabulary.rb
machine_learning.start_trained_model_deployment.rb
machine_learning.stop_trained_model_deployment.rb
Security usef profile APIs promoted from Experimental to Stable:
security/activate_user_profile
security/disable_user_profile
security/enable_user_profile
security/get_user_profile
security/has_privileges_user_profile
security/suggest_user_profile
security/update_user_profile_data
7.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.
8.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.
API Changes
get
- Adds new parameterforce_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 parametercache_size
(String) A byte-size value for configuring the inference cache size. For example, 20mb.mget
- Adds new parameterforce_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 parameterforce_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.
8.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 parametermaster_timeout
(Time) Timeout for submitting request to master.machine_learning.infer_trained_model_deployment
is renamed tomachine_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 beginend
(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 featuressnapshot.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
8.2.2
- Updates dependency on
elastic-transport
to~> 8.0
8.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,-parenttypes
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.
8.0.1
8.1.2
8.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. Addsbody
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
- Removeallow_no_jobs
parameter.ml.get_datafeed_stats
,ml.get_datafeeds
- Removeallow_no_datafeeds
parameter.nodes.hot_threads
-type
parameter addsmem
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
optionshards
changes toshard_stats
.open_point_in_time
-keep_alive
is now a required parameter.search_mvt
-grid_type
parameter addscentroid
option in addition togrid
andpoint
.
New APIs
- OpenID Connect Authentication:
security.oidc_authenticate
,security.oidc_logout
,security.oidc_prepare_authentication
. transform.reset_transform
.- New experimental APIs, designed for internal use by the fleet server project:
fleet.search
,fleet.msearch
.