Release Notesedit

8.xedit

7.xedit

8.6 Release notesedit

8.6.0 Release notesedit

  • Tested versions of Ruby for 8.6.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3 and JRuby 9.4.
  • Updated for compatibility with Elastic Enterprise Search 8.6’s API.

8.5 Release notesedit

8.5.0 Release notesedit

Clientedit

  • Updates dependency on elastic-transport. With the latest release of elastic-transport - v8.1.0 - this gem now supports Faraday v2. 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'

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.

App Searchedit

  • Adds precision_enabled (Boolean) to put_search_settings. See here for more information.
  • search_es_search and search_explain changed the path to api/as/v1 instead of v0 and are now GA with version 8.5 of the stack.

8.4 Release notesedit

8.4.0 Release notesedit

  • Tested versions of Ruby for 8.4.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3.
  • Updated for compatibility with Elastic Enterprise Search 8.4’s API.
  • Fixed client name String in meta header

Changes to Elasticsearch Search in App Searchedit

The Elasticsearch search API for App Search is a beta feature. Beta features are subject to change and are not covered by the support SLA of generally available (GA) features. Elastic plans to promote this feature to GA in a future release.

The Elasticsearch Search API search_es_search has been updated to be more consistent with the Elasticsearch _search API.

In the previous version, a request object was required in the request:

# DEPRECATED - This worked for 8.3 but has been updated in 8.4:
es_request = { body: { query: { bool: { must: { term: { title: 'test' } } } } } }
client.search_es_search(engine_name, body: { request: es_request })

This has been simplified to:

es_request = { query: { bool: { must: { term: { title: 'test' } } } } }
client.search_es_search(engine_name, body: es_request)

8.3 Release notesedit

8.3.0 Release notesedit

  • Tested versions of Ruby for 8.3.0: Ruby (MRI) 2.7, 3.0 and 3.1, JRuby 9.3.
  • General small improvements in documentation.
  • Updated for compatibility with Elastic Enterprise Search 8.3’s API.

Enterprise Searchedit

New API: search_engines - Retrieve information about search engines

8.2 Release notesedit

8.2.1 Release notesedit

  • Adds tracer parameters to enable tracing in elastic-transport. See logging for more information.
  • Updates Workplace Search OAuth implementation. See OAuth Authentication for changes in the OAuth process.

8.2.0 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 8.2.0.
  • Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3. Older versions of Ruby have reached end of life and been removed from the testing matrices. Minimum required Ruby version is Ruby 2.6 to keep compatibility with JRuby 9.3, but it may be upgraded to 2.7 once JRuby 9.4 comes out.

App Searchedit

New APIsedit

  • Adds Elasticsearch Search API (In Technical Preview): Utilize the API to passthrough and execute raw Elasticsearch queries against the indices that power Enterprise Search engines.

    es_request = { body: { query: { bool: { must: { term: { title: 'test' } } } } } }
    client.search_es_search(engine_name, body: { request: es_request })
  • Adds Search Explain API: Submit a search and retrieve an Elasticsearch query.

    response = client.search_explain(engine_name, body: { query: 'test' })
    response.body['query_string']
    # => "GET enterprise-search-engine-app-search-explain/_search"

8.1 Release notesedit

8.1.1 Release notesedit

  • Adds tracer parameters to enable tracing in elastic-transport. See logging for more information.
  • Updates Workplace Search OAuth implementation. See OAuth Authentication for changes in the OAuth process.

8.1.0 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 8.1.0.
  • Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3. Older versions of Ruby have reached end of life and been removed from the testing matrices. Minimum required Ruby version is Ruby 2.6 to keep compatibility with JRuby 9.3, but it may be upgraded to 2.7 once JRuby 9.4 comes out.

8.0 Release notesedit

8.0.1 Release notesedit

  • Adds tracer parameters to enable tracing in elastic-transport. See logging for more information.
  • Updates Workplace Search OAuth implementation. See OAuth Authentication for changes in the OAuth process.

8.0.0 Release notesedit

Generaledit

First release in the 8.x branch of the client.

  • Tested with Elastic Enterprise Search API version 8.0-SNAPSHOT.
  • Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3. Older versions of Ruby have reached end of life and been removed from the testing matrices. Minimum required Ruby version is Ruby 2.6 to keep compatibility with JRuby 9.3, but it may be upgraded to 2.7 once JRuby 9.4 comes out.
  • API: Updated endpoints that make a GET or DELETE requests to not have a body. Requests with PUT and POST now expect most parameters to be in the request body. Parameters that were available as both arguments and in the body are now just in the body.
  • API: An updated generator is being used to generate the endpoint code. The source code documentation has better typing hints for parameters.

Response Objectedit

  • Requests now return an Elastic::API::Response object. This behaves exactly the same as the previous response (Elastic::Transport::Transport::Response) but expands its functionality. With the previous response object, the body of the response had to be accessed calling the body method on the response. This new object behaves like the response.body Hash object, except when the status or headers are sent to it. This makes it easier to access the response data. Example:

    client = Elastic::EnterpriseSearch::Client.new(
      host: 'http://localhost:3002',
      http_auth: {user: 'elastic', password: 'changeme'}
    )
    response = client.health
    response.class
    # => Elastic::API::Response
    response['version']['number']
    # => "8.1.4"
    response.body['version']['number']
    # => "8.1.4"
    response.status
    # => 200
    response.headers
    # =>
    {"date"=>"Tue, 10 May 2022 09:01:10 GMT",
     "content-type"=>"application/json;charset=utf-8",
     "etag"=>"W/\"etag--gzip\"",
     "cache-control"=>"max-age=0, private, must-revalidate",
     "x-request-id"=>"id",
     "x-runtime"=>"0.023468",
     "vary"=>"Accept-Encoding, User-Agent",
     "content-length"=>"755",
     "server"=>"Jetty(9.4.43.v20210629)"}

App Searchedit

API Changesedit
  • API Logs: Removes date parameters for filters. This API requires a nested date object under filters (now passed in via the body) containing from and to keys formatted in accordance with RFC3339. The App Search client provides the helper function date_to_rfc3339 which receives a date String and converts it to the right format.
  • Crawler API : Internal Url updated from v0 to v1. create_crawler_crawl_rule body is a required parameter (order, policy, rule, pattern). create_crawler_entry_point body is required (for value). create_crawler_sitemap body is required (for url). put_crawler_crawl_rule body is required (order, policy, rule, pattern). put_crawler_crawl_schedule body is required (frequency, unit). put_crawler_entry_point body is required (for value). put_crawler_sitemap body is required (url).
  • Curations API: parameters for create_curation and put_curation must be passed in inside the body parameter now.
  • Engine APIs: create_engine removes the name parameter. It must be passed in inside the body parameter now.
  • Log Click: log_clickthrough now requires body, the parameter query and document_id are required.
  • Search: When using search, query can no longer be sent as an argument. The method will raise ArgumentError if no body is sent, since query is a required parameter in the body.
  • APIs where body has been removed since it’s not used: delete_engine, engine, list_engines, curation, delete_curation, schema, api_key, delete_api_key, list_api_keys, delete_synonym_set, list_synonym_set, synonym_set, list_documents, reset_search_settings, search_settings, crawler_active_crawl_request, crawler_crawl_request, crawler_crawl_schedule, crawler_domain, crawler_metrics, crawler_overview, crawler_process_crawl, crawler_process_crawl_denied_urls, crawler_user_agent, delete_crawler_active_crawl_request, delete_crawler_crawl_rule, delete_crawler_crawl_schedule, delete_crawler_domain, delete_crawler_entry_point, delete_crawler_sitemap, list_crawler_crawl_requests, list_crawler_process_crawls.
New APIsedit
  • list_crawler_domain: Lists crawler domains given an engine.
  • Adaptive Relevance Suggestion APIs:

    • adaptive_relevance_suggestions - Retrieves adaptive relevance for a single query.
    • list_adaptive_relevance_suggestions - List the adaptive relevance suggestions for a given engine.
    • put_adaptive_relevance_suggestions - Update adaptive relevance.
  • Adaptive Relevance Settings APIs:

    • adaptive_relevance_settings - Retrieve adaptive relevance settings.
    • put_adaptive_relevance_settings - Update adaptive relevance settings.
    • refresh_adaptive_relevance_update_process - Update suggestions process refresh.

Enterprise Searchedit

  • Read-Only API: put_read_only body is now required with the enabled object: {enabled: true|false}.
  • APIs where body has been removed since it’s not used: health, read_only, stats, version.

Workplace Searchedit

API Changesedit
  • Permissions APIs have been removed: add_user_permissions, list_permissions, put_user_permissions, remove_user_permissions, user_permissions.
  • current_user removed get_token parameter.
  • Analytics: create_analytics_events will raise ArgumentError if body is missing (Required: type, query_id, page, content_source_id, document_id, rank)
  • Content Sources: create_content_source will raise ArgumentError if body is missing (Required: name). name cannot be passed in as a parameter anymore, needs to be in the body. put_content_source will raise ArgumentError if body is missing (Required: name, is_searchable). put_content_source_icons will raise ArgumentError if body is missing.
  • External Identities: create_external_identity will raise ArgumentError if body is missing (Required: external_user_id, external_user_properties, permissions). Body parameters have changed:

    body = {
      external_user_id: external_user_id,
      permissions: [],
      external_user_properties: [
        'attribute_name' => '_elasticsearch_username',
        'attribute_value' => 'fernando'
      ]
    }
    client.create_external_identity(content_source_id, body: body)

    In delete_external_identity, external_identity and put_external_identity the required parameter changed from user to external_user_id. See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-external-identities-api.html

  • Search: Parameters need to be passed in via body to search. It will raise ArgumentError if body is missing.
  • Documents: delete_documents will raise ArgumentError if body is missing (Required document_ids).
  • Sync Jobs: command_sync_jobs will raise ArgumentError if body is missing.
  • Synonyms: create_batch_synonym_sets, put_synonym_set will raise ArgumentError if body is missing.
  • APIs where body has been removed since it’s not used: auto_query_refinement_details, content_source, current_user, delete_content_source, delete_external_identity, delete_synonym_set, document, external_identity, list_content_sources, list_external_identities, put_triggers_blocklist, synonym_set, triggers_blocklist.
New APIsedit
  • list_documents: Lists documents from a custom content source.

7.17 Release notesedit

7.17.1 Release notesedit

  • Updates in Documentation: CHANGELOG, CODE_OF_CONDUCT, CONTRIBUTING, NOTICE, README
  • Adds the option to specify an adapter for Faraday when initializing a client. See README
  • Fixes typo in meta data for CLIENT_NAME.

7.17.0 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 7.17.0.
  • Last release in the 7.x branch.
  • Tested with Ruby 2.6, 2.7, 3.0, 3.1

7.16 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 7.16.0.

App Searchedit

  • Adds Adaptive Relevance APIs. The adaptive relevance API is a beta feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release. The adaptive relevance API is not available at all Elastic subscription levels. Refer to the Elastic subscriptions pages for Elastic Cloud and self-managed deployments: adaptive_relevance_settings, adaptive_relevance_suggestions, list adaptive_relevance_suggestions, put_adaptive_relevance_settings, put_adaptive_relevance_suggestions.
  • Adds list_crawler_domains - Returns a list of crawler domains

Workplace Searchedit

  • Adds list_documents - List documents from a custom content source

7.15 Release notesedit

7.15.1 Release notesedit

Dependency fixedit

Updates dependency on elasticsearch-transport to be more open. At least 7.11 is required, but this way it can be used with different versions of the elasticsearch gem (bigger than or equal to 7.11) in the same project, without a conflict in elasticsearch-transport. When instantiating transport, we now check if version is < 7.14 so we use the right class.

7.15.0 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 7.15.0.
  • Better source code documentation in general for API endpoints.

App Searchedit

  • The test suite was migrated to full integration testing in Jenkins. We were using VCR for testing the API, but now we’re running the API tests against an instance of Elastic Enterprise Search.
  • Some APIs that used to work with GET query parameters in App Search are now POST and the parameters being sent with the body. We’ll use the body from 7.15, but we’ll keep supporting arguments parameters in 7.x for backwards compatibility. Some parameters previously required through the generated code don’t throw an exception anymore and the error is delegated to server. As mentioned, these should go through the body instead of part of the query parameters, but we still support sending them as query parameters in 7.x to keep backwards compatibility.
Web Crawler APIedit

The Elastic Enterprise Search web crawler API is a beta feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release.

New Web Crawler API endpoints:

crawler_active_crawl_request, crawler_crawl_request, crawler_crawl_schedule, crawler_domain, crawler_domain_validation_result, crawler_metrics, crawler_overview, crawler_process_crawl_denied_urls, crawler_process_crawl, crawler_url_extraction_result, crawler_url_tracing_result, crawler_url_validation_result, crawler_user_agent, create_crawler_crawl_request, create_crawler_crawl_rule, create_crawler_domain, create_crawler_entry_point, create_crawler_process_crawl, create_crawler_sitemap, delete_active_crawl_request, delete_crawler_active_crawl_request, delete_crawler_crawl_rule, delete_crawler_crawl_schedule, delete_crawler_domain, delete_crawler_entry_point, delete_crawler_sitemap, list_crawler_crawl_requests, list_crawler_process_crawls, put_crawler_crawl_rule, put_crawler_crawl_schedule, put_crawler_domain, put_crawler_entry_point, put_crawler_sitemap.

Refer to App Search API for more information and examples.

Workplace Searchedit

  • New APIs: auto_query_refinement_details, triggers_blocklist and put_triggers_blocklist. See Workplace Search API for more information and examples.

7.14 Release notesedit

7.14.1 Release notesedit

Dependency fixedit

Updates dependency on elasticsearch-transport to be more open. At least 7.11 is required, but this way it can be used with different versions of the elasticsearch gem (bigger than or equal to 7.11) in the same project, without a conflict in elasticsearch-transport. When instantiating transport, we now check if version is < 7.14 so we use the right class.

7.14.0 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 7.14.0.

App Searchedit

  • Adds API Key endpoints: api_key, create_api_key, delete_api_key, list_api_keys, put_api_key

Workplace Searchedit

  • Adds synonym set endpoints: create_batch_synonym_sets, delete_synonym_set, list_synonym_sets, put_synonym_set, synonym_set
  • Adds current_user endpoint
  • Adds command_sync_jobs endpoint
  • Adds delete_documents_by_query endpoint
  • Adds put_content_source_icons endpoint

7.13.0 Release notesedit

Generaledit

  • Tested with Elastic Enterprise Search API version 7.13.0.
  • Improved meta header implementation for Elastic Cloud.

Workplace Searchedit

  • The client now supports Basic Authentication and Elasticsearch tokens. All Workplace Search APIs support Basic Authentication, Elasticsearch tokens and Workplace Search admin user access tokens as an authentication method. You still need to set up user access tokens generated by the Workplace Search OAuth Service for the Search API and the Analytics Events API.
  • New APIs:

    • document: Retrieve a document by ID from a specified content source.
    • delete_all_documents: Delete all documents for a given content source
    • content_source: Retrieves a content source by ID
    • create_content_source: Creates a custom content source
    • delete_content_source: Deletes a content source by ID
    • list_content_sources: Retrieves all content sources
    • put_content_source: Updates a custom content source

7.12 Release notesedit

7.12.1 Release notesedit

  • Elastic Transport: Locks dependency version to < 7.14
  • Elastic Transport: Adds ENTERPRISE_SERVICE_VERSION constant for compatibility

7.12.0 Release notesedit

Generaledit

App Searchedit

  • Updates source code documentation for current_page and page_size parameters from type String to Integer.
  • In multi_search, the body parameter is renamed to body from queries to avoid repetition and potential confusion.

Workplace Searchedit

  • Body parameter renamed to document_ids in delete_documents:
client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])

7.11.0 Release notesedit

First General Availability Release

Generaledit

  • All App Search, Workplace Search and Enterprise Search API endpoints have been implemented updated to the 7.11 specification, and have been tested and documented.
  • Docs were moved from the README file to asciidocs.
  • Some endpoints both in App Search and Workplace Search have changed to have named parameters for body when it makes sense.
  • Support for per request custom HTTP headers was added. See docs.
  • Support for per request http authentication was added when using OAuth. See docs.
  • Tested with Ruby 3.
  • Sends the X-Elastic-Client-Meta HTTP header which is used by Elastic Cloud and can be disabled with the enable_meta_header parameter.

App Searchedit

  • Added support for signed search key in App Search.

Workplace Searchedit

  • content_source_key was deprecated in favour of content_source_id.
  • Added support for OAuth.
  • With OAuth support, search and create_analytics APIs are now also available.

7.10.0.beta.1 Release notesedit

First beta release. It supports the 7.10.0 API for Elastic Enterprise Search, App Search and Workplace Search.