elastic-enterprise-search 8.0.1 → 8.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/test-matrix.yml +1 -1
  3. data/.github/workflows/testing.yml +1 -2
  4. data/docs/guide/connecting.asciidoc +1 -0
  5. data/docs/guide/overview.asciidoc +1 -16
  6. data/docs/guide/release_notes/714.asciidoc +12 -0
  7. data/docs/guide/release_notes/715.asciidoc +12 -0
  8. data/docs/guide/release_notes/80.asciidoc +0 -11
  9. data/docs/guide/release_notes/81.asciidoc +8 -0
  10. data/docs/guide/release_notes/index.asciidoc +2 -0
  11. data/docs/guide/workplace-search-api.asciidoc +4 -24
  12. data/lib/elastic/app-search/api/adaptive_relevance_suggestions.rb +0 -1
  13. data/lib/elastic/app-search/api/add_meta_engine_source.rb +0 -1
  14. data/lib/elastic/app-search/api/api_key.rb +0 -1
  15. data/lib/elastic/app-search/api/api_logs.rb +0 -1
  16. data/lib/elastic/app-search/api/count_analytics.rb +0 -1
  17. data/lib/elastic/app-search/api/crawler_crawl_request.rb +0 -1
  18. data/lib/elastic/app-search/api/crawler_domain.rb +0 -1
  19. data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +0 -1
  20. data/lib/elastic/app-search/api/crawler_process_crawl.rb +0 -1
  21. data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +0 -1
  22. data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +1 -2
  23. data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +0 -1
  24. data/lib/elastic/app-search/api/crawler_url_validation_result.rb +0 -1
  25. data/lib/elastic/app-search/api/create_api_key.rb +0 -1
  26. data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +1 -1
  27. data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +0 -1
  28. data/lib/elastic/app-search/api/create_crawler_domain.rb +0 -1
  29. data/lib/elastic/app-search/api/create_crawler_entry_point.rb +0 -1
  30. data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +0 -1
  31. data/lib/elastic/app-search/api/create_crawler_sitemap.rb +0 -1
  32. data/lib/elastic/app-search/api/create_curation.rb +0 -1
  33. data/lib/elastic/app-search/api/create_engine.rb +0 -1
  34. data/lib/elastic/app-search/api/create_synonym_set.rb +0 -1
  35. data/lib/elastic/app-search/api/curation.rb +0 -1
  36. data/lib/elastic/app-search/api/delete_api_key.rb +0 -1
  37. data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +0 -1
  38. data/lib/elastic/app-search/api/delete_crawler_domain.rb +0 -1
  39. data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +0 -1
  40. data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +0 -1
  41. data/lib/elastic/app-search/api/delete_curation.rb +0 -1
  42. data/lib/elastic/app-search/api/delete_documents.rb +0 -1
  43. data/lib/elastic/app-search/api/delete_meta_engine_source.rb +0 -1
  44. data/lib/elastic/app-search/api/delete_synonym_set.rb +0 -1
  45. data/lib/elastic/app-search/api/documents.rb +0 -1
  46. data/lib/elastic/app-search/api/index_documents.rb +0 -1
  47. data/lib/elastic/app-search/api/list_adaptive_relevance_suggestions.rb +0 -1
  48. data/lib/elastic/app-search/api/log_clickthrough.rb +0 -1
  49. data/lib/elastic/app-search/api/put_adaptive_relevance_settings.rb +0 -1
  50. data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +0 -1
  51. data/lib/elastic/app-search/api/put_api_key.rb +0 -1
  52. data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +0 -1
  53. data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +0 -1
  54. data/lib/elastic/app-search/api/put_crawler_domain.rb +0 -1
  55. data/lib/elastic/app-search/api/put_crawler_entry_point.rb +0 -1
  56. data/lib/elastic/app-search/api/put_crawler_sitemap.rb +0 -1
  57. data/lib/elastic/app-search/api/put_curation.rb +0 -1
  58. data/lib/elastic/app-search/api/put_documents.rb +0 -1
  59. data/lib/elastic/app-search/api/put_schema.rb +0 -1
  60. data/lib/elastic/app-search/api/put_search_settings.rb +0 -1
  61. data/lib/elastic/app-search/api/put_synonym_set.rb +0 -1
  62. data/lib/elastic/app-search/api/query_suggestion.rb +0 -1
  63. data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +0 -1
  64. data/lib/elastic/app-search/api/search.rb +0 -1
  65. data/lib/elastic/app-search/api/synonym_set.rb +0 -1
  66. data/lib/elastic/app-search/api/top_clicks_analytics.rb +0 -1
  67. data/lib/elastic/app-search/api/top_queries_analytics.rb +0 -1
  68. data/lib/elastic/enterprise-search/api/put_read_only.rb +0 -1
  69. data/lib/elastic/enterprise-search/client.rb +1 -13
  70. data/lib/elastic/enterprise-search/version.rb +1 -1
  71. data/lib/elastic/workplace-search/workplace_search.rb +2 -9
  72. data/spec/workplace-search/client_spec.rb +2 -10
  73. metadata +4 -5
  74. data/.ci/jobs/elastic+enterprise-search-ruby+7.13.yml +0 -12
  75. data/.ci/jobs/elastic+enterprise-search-ruby+7.14.yml +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b55888296586fd03618a388884373c963fd0f389954b771adcb44a9a9c796f6
4
- data.tar.gz: 9b13f8eb9bdca6f3b3fc094862790eef669295409ab320384107f494395e817a
3
+ metadata.gz: bdfa7f9a297b7be12956c4afb18c566ef6362be6f80b7ddcdf210a63de35792b
4
+ data.tar.gz: c0ea8e919e929a7a9a03dd183198d7a29f49b95a9fc1e044fb6d1c4becf87adf
5
5
  SHA512:
6
- metadata.gz: 59430b169a6ea03749fdd18b71b368a1848910c7f36ff78a7ce758658a6cccffad4d2d0fb1a7721f75c3bf60c2995865aabb11dee3a7a2f96c059b7bc6c5ac99
7
- data.tar.gz: ba6a0a99945e889129ac4e2fc496ce875ed61a50ba9b798fe69567b222dec97782c7bb2f7951c9e9f5d6ffb5469c0feb2dd9a63af494e7ff59717cb1d0240c14
6
+ metadata.gz: 9bf7a70b4070b475c5929dee3dce93841db5150bd3502b1b22595ed037cc7f9fbb60e4ade158009af80059ee84f727c192663efd4e9913697bb5860110a327f5
7
+ data.tar.gz: 11ce05ae809478b90e8980b43b0c28fdfa33d79bb3d398fcf832d1bdb25c7495600cde089bb9d448d3a39599e17484c59bce1704f8f4f0fc5fc362eb2215ce37
data/.ci/test-matrix.yml CHANGED
@@ -5,7 +5,7 @@ RUBY_VERSION:
5
5
  - 2.7
6
6
 
7
7
  STACK_VERSION:
8
- - 8.0-SNAPSHOT
8
+ - 8.1-SNAPSHOT
9
9
 
10
10
  SERVICE:
11
11
  - appsearch
@@ -7,8 +7,7 @@ jobs:
7
7
  ENDPOINT: http://localhost:8080
8
8
  strategy:
9
9
  matrix:
10
- ruby: [ 2.7, 3.0, 3.1 ]
11
-
10
+ ruby: [ '2.7', '3.0', '3.1' ]
12
11
  runs-on: ubuntu-latest
13
12
  steps:
14
13
  - uses: actions/checkout@v2
@@ -1,6 +1,7 @@
1
1
  [[connecting]]
2
2
  == Connecting
3
3
 
4
+
4
5
  This page contains the information you need to connect and use the Client with Elastic Enterprise Search.
5
6
 
6
7
  **On this page**
@@ -14,7 +14,6 @@ For **Elastic Enterprise Search 7.0** and later, use the major version 7 (`7.x.y
14
14
 
15
15
  [discrete]
16
16
  === HTTP Library
17
-
18
17
  This library uses https://github.com/elastic/elastic-transport-ruby[elastic-transport], the low-level Ruby client for connecting to an Elastic clusters - also used in the official https://github.com/elastic/elasticsearch-ruby[Elasticsearch Ruby Client]. It uses https://rubygems.org/gems/faraday[Faraday], which supports several https://lostisland.github.io/faraday/adapters/[adapters] and will use `Net::HTTP` by default. For optimal performance with the Enterprise Search API, we suggest using an HTTP library which supports persistent ("keep-alive") connections. For the standard Ruby implementation, this could be https://github.com/drbrain/net-http-persistent[Net::HTTP::Persistent], https://github.com/toland/patron[patron] or https://github.com/typhoeus/typhoeus[Typhoeus]. For JRuby, https://github.com/cheald/manticore[Manticore] is a great option as well. Require the library for the adapter in your code and then pass in the `:adapter` parameter to the client when you initialize it:
19
18
 
20
19
  [source,ruby]
@@ -39,7 +38,7 @@ If you don't specify a host and port, the client will default to `http://localho
39
38
  [discrete]
40
39
  === Logging
41
40
 
42
- You can enable logging with the default logger by passing `log: true` as a parameter to the client's initializer, or pass in a Logger object with the `:logger` parameter, any confoming logger implementation:
41
+ You can enable logging with the default logger by passing `log: true` as a parameter to the client's initializer, or pass in a Logger object with the `:logger` parameter:
43
42
 
44
43
  [source,rb]
45
44
  ----------------------------
@@ -47,20 +46,6 @@ logger = MyLogger.new
47
46
  client = Elastic::EnterpriseSearch::Client.new(logger: logger)
48
47
  ----------------------------
49
48
 
50
- To trace requests and responses in the _Curl_ format, set the `trace` argument:
51
-
52
- [source,rb]
53
- ----------------------------
54
- client = Elastic::EnterpriseSearch::Client.new(trace: true)
55
- ----------------------------
56
-
57
- This will use the `elastic-transport` default logger. But you can pass in a custom logger with:
58
-
59
- [source,rb]
60
- ----------------------------
61
- client = Elastic::EnterpriseSearch::Client.new(tracer: my_tracer)
62
- ----------------------------
63
-
64
49
  [discrete]
65
50
  === License
66
51
 
@@ -1,4 +1,16 @@
1
1
  [[release_notes_714]]
2
+ === 7.14 Release notes
3
+
4
+ [discrete]
5
+ [[release_notes_7141]]
6
+ === 7.14.1 Release notes
7
+
8
+ ==== Dependency fix
9
+
10
+ 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.
11
+
12
+ [discrete]
13
+ [[release_notes_7140]]
2
14
  === 7.14.0 Release notes
3
15
 
4
16
  [discrete]
@@ -1,4 +1,16 @@
1
1
  [[release_notes_715]]
2
+ === 7.15 Release notes
3
+
4
+ [discrete]
5
+ [[release_notes_7151]]
6
+ === 7.15.1 Release notes
7
+
8
+ ==== Dependency fix
9
+
10
+ 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.
11
+
12
+ [discrete]
13
+ [[release_notes_7150]]
2
14
  === 7.15.0 Release notes
3
15
 
4
16
  [discrete]
@@ -1,15 +1,4 @@
1
1
  [[release_notes_80]]
2
- === 8.0 Release notes
3
-
4
- [discrete]
5
- [[release_notes_801]]
6
- === 8.0.1 Release notes
7
-
8
- - Adds tracer parameters to enable tracing in elastic-transport. See https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/overview.html#_logging[logging] for more information.
9
- - Updates Workplace Search OAuth implementation. See https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/workplace-search-api.html#ws-oauth-authentication[OAuth Authentication] for changes in the OAuth process.
10
-
11
- [discrete]
12
- [[release_notes_800]]
13
2
  === 8.0.0 Release notes
14
3
 
15
4
  [discrete]
@@ -0,0 +1,8 @@
1
+ [[release_notes_81]]
2
+ === 8.1.0 Release notes
3
+
4
+ [discrete]
5
+ ==== General
6
+
7
+ - Tested with Elastic Enterprise Search API version 8.1.0.
8
+ - 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.
@@ -3,6 +3,7 @@
3
3
 
4
4
  [discrete]
5
5
  === 8.x
6
+ * <<release_notes_81, 8.1.0 Release Notes>>
6
7
  * <<release_notes_80, 8.0.0 Release Notes>>
7
8
 
8
9
  [discrete]
@@ -17,6 +18,7 @@
17
18
  * <<release_notes_711, 7.11.0 Release Notes>>
18
19
  * <<release_notes_710, 7.10.0.beta.1 Release Notes>>
19
20
 
21
+ include::81.asciidoc[]
20
22
  include::80.asciidoc[]
21
23
  include::717.asciidoc[]
22
24
  include::716.asciidoc[]
@@ -76,42 +76,22 @@ client.delete_documents_by_query(content_source_id, query: query)
76
76
  [[ws-oauth-authentication]]
77
77
  === OAuth Authentication
78
78
 
79
- You need to configure the OAuth Application for Search in order to use the Workplace Search client's `search` and `create_analytics` endpoints. You need to follow the steps in https://www.elastic.co/guide/en/workplace-search/current/building-custom-search-workplace-search.html#configuring-search-oauth[Configuring the OAuth Application for Search] to retrieve the credentials: **Client ID** and **Client Secret** to request access tokens from the authentication server.
80
-
81
- The client implements https://www.elastic.co/guide/en/workplace-search/current/building-custom-search-workplace-search.html#authenticating-search-user-confidential[Authenticating Users with a Confidential OAuth Flow]. It provides a helper to obtain the autorization URL directly from the client once you've set the necessary values.
82
-
83
- The authorization endpoint is hosted by your Kibana deployment, so you need to provide the client with the https://www.elastic.co/guide/en/enterprise-search/current/endpoints-ref.html#kibana-base-url[base URL of your Kibana instance]. You can do this when you initialize the client:
84
-
85
- [source,rb]
86
- ----------------------------
87
- client = Elastic::EnterpriseSearch::WorkplaceSearch::Client.new(http_auth: <access_token>, kibana_url: <kibana_url>)
88
- ----------------------------
89
-
90
- Or you can set in an existing client:
79
+ You need to configure the OAuth Application for Search in order to use the Workplace Search client's `search` and `create_analytics` endpoints. You need to follow the steps in https://www.elastic.co/guide/en/workplace-search/current/building-custom-search-workplace-search.html#configuring-search-oauth[Configuring the OAuth Application for Search] to retrieve the credentials: Client ID and Client Secret to request access tokens from the authentication server.
91
80
 
92
81
  [source,rb]
93
82
  ----------------------------
94
83
  client = Elastic::EnterpriseSearch::WorkplaceSearch::Client.new(http_auth: <access_token>)
95
- client.kibana_url = <kibana_url>
96
- ----------------------------
97
84
 
98
- Once you've instantiated a client and the base URL of your Kibana instance is set, you can get the URL for authorization like so:
99
- [source,rb]
100
- ----------------------------
101
- # You get the values for client_id and client_secret when configuring the OAuth Application:
102
85
  client_id = <client_id>
103
86
  client_secret = <client_secret>
104
87
  redirect_uri = <redirect_uri>
105
88
 
106
89
  # Get the authorization URL:
107
90
  client.authorization_url(client_id, redirect_uri)
108
- > https://kibana_url/app/enterprise_search/workplace_search/p/oauth/authorize?response_type=code&client_id=client_id&redirect_uri=https%3A%2F%2Flocalhost%3A3002
109
-
91
+ > https://host:port/ws/oauth/authorize?response_type=code&client_id=client_id&redirect_uri=https%3A%2F%2Flocalhost%3A3002
110
92
  ----------------------------
111
93
 
112
- Open the URL to authorize your application. Successful authorization redirects the user in accordance to the redirect URI provided (and configured for the application).
113
-
114
- The application server must now request for an `access_token`, which is generated by Workplace Search using the `oauth/token` endpoint, using the **Client ID** and **Client Secret**.
94
+ Open the URL to authorize your application. Successful authorization redirects the user in accordance to the redirect URI provided (and configured for the application). The application server must now request for an access_token, which is generated by Workplace Search using the oauth/token endpoint, using the Client ID and Client Secret.
115
95
 
116
96
  [source,rb]
117
97
  ----------------------------
@@ -120,7 +100,7 @@ authorization_code = '<paste code from redirect>'
120
100
  access_token = client.request_access_token(client_id, client_secret, authorization_code, redirect_uri)
121
101
 
122
102
  # The access_token can now be used to issue a search request:
123
- client.search(body: { query: 'search query' }, access_token: access_token)
103
+ client.search(body: {query: 'search query'}, access_token: access_token)
124
104
  ----------------------------
125
105
 
126
106
  See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-search-api.html#search-api-overview[Search API Overview] for more search parameters.
@@ -44,7 +44,6 @@ module Elastic
44
44
 
45
45
  search_suggestion_query = arguments.delete(:search_suggestion_query)
46
46
  body = arguments.delete(:body) || {}
47
-
48
47
  headers = arguments.delete(:headers) || {}
49
48
  request(
50
49
  :post,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  source_engines = arguments.delete(:source_engines) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :post,
@@ -34,7 +34,6 @@ module Elastic
34
34
  raise ArgumentError, "Required parameter 'api_key_name' missing" unless arguments[:api_key_name]
35
35
 
36
36
  api_key_name = arguments.delete(:api_key_name)
37
-
38
37
  headers = arguments.delete(:headers) || {}
39
38
  request(
40
39
  :get,
@@ -40,7 +40,6 @@ module Elastic
40
40
  raise ArgumentError, "Required parameter 'body (filters)' missing" unless arguments[:body]
41
41
 
42
42
  body = arguments.delete(:body) || {}
43
-
44
43
  headers = arguments.delete(:headers) || {}
45
44
  request(
46
45
  :post,
@@ -37,7 +37,6 @@ module Elastic
37
37
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
38
 
39
39
  body = arguments.delete(:body) || {}
40
-
41
40
  headers = arguments.delete(:headers) || {}
42
41
  request(
43
42
  :post,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'crawl_request_id' missing" unless arguments[:crawl_request_id]
37
37
 
38
38
  crawl_request_id = arguments.delete(:crawl_request_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
37
37
 
38
38
  domain_id = arguments.delete(:domain_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -33,7 +33,6 @@ module Elastic
33
33
  #
34
34
  def crawler_domain_validation_result(arguments = {})
35
35
  body = arguments.delete(:body) || {}
36
-
37
36
  headers = arguments.delete(:headers) || {}
38
37
  request(
39
38
  :post,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'process_crawl_id' missing" unless arguments[:process_crawl_id]
37
37
 
38
38
  process_crawl_id = arguments.delete(:process_crawl_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'process_crawl_id' missing" unless arguments[:process_crawl_id]
37
37
 
38
38
  process_crawl_id = arguments.delete(:process_crawl_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -30,13 +30,12 @@ module Elastic
30
30
  # @option body [string] :url *Required*
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
33
- # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html
33
+ # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-extract-url
34
34
  #
35
35
  def crawler_url_extraction_result(engine_name, arguments = {})
36
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
37
 
38
38
  body = arguments.delete(:body) || {}
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :post,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
37
 
38
38
  body = arguments.delete(:body) || {}
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :post,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
37
 
38
38
  body = arguments.delete(:body) || {}
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :post,
@@ -41,7 +41,6 @@ module Elastic
41
41
  raise ArgumentError, "Required parameter 'body (name,type)' missing" unless arguments[:body]
42
42
 
43
43
  body = arguments.delete(:body) || {}
44
-
45
44
  headers = arguments.delete(:headers) || {}
46
45
  request(
47
46
  :post,
@@ -28,6 +28,7 @@ module Elastic
28
28
  # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [Hash] :body
30
30
  # @option body [integer] :max_crawl_depth
31
+ # @option body [boolean] :sitemap_discovery_disabled
31
32
  # @option body [Array<string>] :domain_allowlist
32
33
  # @option body [Array<string>] :seed_urls
33
34
  # @option body [Array<string>] :sitemap_urls
@@ -39,7 +40,6 @@ module Elastic
39
40
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
40
41
 
41
42
  body = arguments.delete(:body) || {}
42
-
43
43
  headers = arguments.delete(:headers) || {}
44
44
  request(
45
45
  :post,
@@ -45,7 +45,6 @@ module Elastic
45
45
 
46
46
  domain_id = arguments.delete(:domain_id)
47
47
  body = arguments.delete(:body) || {}
48
-
49
48
  headers = arguments.delete(:headers) || {}
50
49
  request(
51
50
  :post,
@@ -39,7 +39,6 @@ module Elastic
39
39
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
40
40
 
41
41
  body = arguments.delete(:body) || {}
42
-
43
42
  headers = arguments.delete(:headers) || {}
44
43
  request(
45
44
  :post,
@@ -42,7 +42,6 @@ module Elastic
42
42
 
43
43
  domain_id = arguments.delete(:domain_id)
44
44
  body = arguments.delete(:body) || {}
45
-
46
45
  headers = arguments.delete(:headers) || {}
47
46
  request(
48
47
  :post,
@@ -37,7 +37,6 @@ module Elastic
37
37
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
38
 
39
39
  body = arguments.delete(:body) || {}
40
-
41
40
  headers = arguments.delete(:headers) || {}
42
41
  request(
43
42
  :post,
@@ -42,7 +42,6 @@ module Elastic
42
42
 
43
43
  domain_id = arguments.delete(:domain_id)
44
44
  body = arguments.delete(:body) || {}
45
-
46
45
  headers = arguments.delete(:headers) || {}
47
46
  request(
48
47
  :post,
@@ -41,7 +41,6 @@ module Elastic
41
41
  raise ArgumentError, "Required parameter 'body (queries)' missing" unless arguments[:body]
42
42
 
43
43
  body = arguments.delete(:body) || {}
44
-
45
44
  headers = arguments.delete(:headers) || {}
46
45
  request(
47
46
  :post,
@@ -40,7 +40,6 @@ module Elastic
40
40
  raise ArgumentError, "Required parameter 'body (name)' missing" unless arguments[:body]
41
41
 
42
42
  body = arguments.delete(:body) || {}
43
-
44
43
  headers = arguments.delete(:headers) || {}
45
44
  request(
46
45
  :post,
@@ -38,7 +38,6 @@ module Elastic
38
38
  raise ArgumentError, "Required parameter 'body (synonyms)' missing" unless arguments[:body]
39
39
 
40
40
  body = arguments.delete(:body) || {}
41
-
42
41
  headers = arguments.delete(:headers) || {}
43
42
  request(
44
43
  :post,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'curation_id' missing" unless arguments[:curation_id]
37
37
 
38
38
  curation_id = arguments.delete(:curation_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -34,7 +34,6 @@ module Elastic
34
34
  raise ArgumentError, "Required parameter 'api_key_name' missing" unless arguments[:api_key_name]
35
35
 
36
36
  api_key_name = arguments.delete(:api_key_name)
37
-
38
37
  headers = arguments.delete(:headers) || {}
39
38
  request(
40
39
  :delete,
@@ -39,7 +39,6 @@ module Elastic
39
39
 
40
40
  domain_id = arguments.delete(:domain_id)
41
41
  crawl_rule_id = arguments.delete(:crawl_rule_id)
42
-
43
42
  headers = arguments.delete(:headers) || {}
44
43
  request(
45
44
  :delete,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
37
37
 
38
38
  domain_id = arguments.delete(:domain_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :delete,
@@ -39,7 +39,6 @@ module Elastic
39
39
 
40
40
  domain_id = arguments.delete(:domain_id)
41
41
  entry_point_id = arguments.delete(:entry_point_id)
42
-
43
42
  headers = arguments.delete(:headers) || {}
44
43
  request(
45
44
  :delete,
@@ -39,7 +39,6 @@ module Elastic
39
39
 
40
40
  domain_id = arguments.delete(:domain_id)
41
41
  sitemap_id = arguments.delete(:sitemap_id)
42
-
43
42
  headers = arguments.delete(:headers) || {}
44
43
  request(
45
44
  :delete,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'curation_id' missing" unless arguments[:curation_id]
37
37
 
38
38
  curation_id = arguments.delete(:curation_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :delete,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  document_ids = arguments.delete(:document_ids) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :delete,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  source_engines = arguments.delete(:source_engines) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :delete,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]
37
37
 
38
38
  synonym_set_id = arguments.delete(:synonym_set_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :delete,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
37
 
38
38
  document_ids = arguments.delete(:document_ids) || {}
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  documents = arguments.delete(:documents) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :post,
@@ -37,7 +37,6 @@ module Elastic
37
37
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
38
 
39
39
  body = arguments.delete(:body) || {}
40
-
41
40
  headers = arguments.delete(:headers) || {}
42
41
  request(
43
42
  :post,
@@ -40,7 +40,6 @@ module Elastic
40
40
  raise ArgumentError, "Required parameter 'body (query,document_id)' missing" unless arguments[:body]
41
41
 
42
42
  body = arguments.delete(:body) || {}
43
-
44
43
  headers = arguments.delete(:headers) || {}
45
44
  request(
46
45
  :post,
@@ -37,7 +37,6 @@ module Elastic
37
37
  raise ArgumentError, "Required parameter 'body (curation)' missing" unless arguments[:body]
38
38
 
39
39
  body = arguments.delete(:body) || {}
40
-
41
40
  headers = arguments.delete(:headers) || {}
42
41
  request(
43
42
  :put,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  body = arguments.delete(:body) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :put,
@@ -44,7 +44,6 @@ module Elastic
44
44
 
45
45
  api_key_name = arguments.delete(:api_key_name)
46
46
  body = arguments.delete(:body) || {}
47
-
48
47
  headers = arguments.delete(:headers) || {}
49
48
  request(
50
49
  :put,
@@ -48,7 +48,6 @@ module Elastic
48
48
  domain_id = arguments.delete(:domain_id)
49
49
  crawl_rule_id = arguments.delete(:crawl_rule_id)
50
50
  body = arguments.delete(:body) || {}
51
-
52
51
  headers = arguments.delete(:headers) || {}
53
52
  request(
54
53
  :put,
@@ -38,7 +38,6 @@ module Elastic
38
38
  raise ArgumentError, "Required parameter 'body (frequency,unit)' missing" unless arguments[:body]
39
39
 
40
40
  body = arguments.delete(:body) || {}
41
-
42
41
  headers = arguments.delete(:headers) || {}
43
42
  request(
44
43
  :put,
@@ -42,7 +42,6 @@ module Elastic
42
42
 
43
43
  domain_id = arguments.delete(:domain_id)
44
44
  body = arguments.delete(:body) || {}
45
-
46
45
  headers = arguments.delete(:headers) || {}
47
46
  request(
48
47
  :put,
@@ -45,7 +45,6 @@ module Elastic
45
45
  domain_id = arguments.delete(:domain_id)
46
46
  entry_point_id = arguments.delete(:entry_point_id)
47
47
  body = arguments.delete(:body) || {}
48
-
49
48
  headers = arguments.delete(:headers) || {}
50
49
  request(
51
50
  :put,
@@ -45,7 +45,6 @@ module Elastic
45
45
  domain_id = arguments.delete(:domain_id)
46
46
  sitemap_id = arguments.delete(:sitemap_id)
47
47
  body = arguments.delete(:body) || {}
48
-
49
48
  headers = arguments.delete(:headers) || {}
50
49
  request(
51
50
  :put,
@@ -44,7 +44,6 @@ module Elastic
44
44
 
45
45
  curation_id = arguments.delete(:curation_id)
46
46
  body = arguments.delete(:body) || {}
47
-
48
47
  headers = arguments.delete(:headers) || {}
49
48
  request(
50
49
  :put,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  documents = arguments.delete(:documents) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :patch,
@@ -35,7 +35,6 @@ module Elastic
35
35
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
36
 
37
37
  schema = arguments.delete(:schema) || {}
38
-
39
38
  headers = arguments.delete(:headers) || {}
40
39
  request(
41
40
  :post,
@@ -39,7 +39,6 @@ module Elastic
39
39
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
40
40
 
41
41
  body = arguments.delete(:body) || {}
42
-
43
42
  headers = arguments.delete(:headers) || {}
44
43
  request(
45
44
  :put,
@@ -41,7 +41,6 @@ module Elastic
41
41
 
42
42
  synonym_set_id = arguments.delete(:synonym_set_id)
43
43
  body = arguments.delete(:body) || {}
44
-
45
44
  headers = arguments.delete(:headers) || {}
46
45
  request(
47
46
  :put,
@@ -38,7 +38,6 @@ module Elastic
38
38
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
39
39
 
40
40
  body = arguments.delete(:body) || {}
41
-
42
41
  headers = arguments.delete(:headers) || {}
43
42
  request(
44
43
  :post,
@@ -40,7 +40,6 @@ module Elastic
40
40
  end
41
41
 
42
42
  adaptive_relevance_suggestion_type = arguments.delete(:adaptive_relevance_suggestion_type)
43
-
44
43
  headers = arguments.delete(:headers) || {}
45
44
  request(
46
45
  :post,
@@ -46,7 +46,6 @@ module Elastic
46
46
  raise ArgumentError, "Required parameter 'body (query)' missing" unless arguments[:body]
47
47
 
48
48
  body = arguments.delete(:body) || {}
49
-
50
49
  headers = arguments.delete(:headers) || {}
51
50
  request(
52
51
  :post,
@@ -36,7 +36,6 @@ module Elastic
36
36
  raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]
37
37
 
38
38
  synonym_set_id = arguments.delete(:synonym_set_id)
39
-
40
39
  headers = arguments.delete(:headers) || {}
41
40
  request(
42
41
  :get,
@@ -38,7 +38,6 @@ module Elastic
38
38
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
39
39
 
40
40
  body = arguments.delete(:body) || {}
41
-
42
41
  headers = arguments.delete(:headers) || {}
43
42
  request(
44
43
  :post,
@@ -37,7 +37,6 @@ module Elastic
37
37
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
38
 
39
39
  body = arguments.delete(:body) || {}
40
-
41
40
  headers = arguments.delete(:headers) || {}
42
41
  request(
43
42
  :post,
@@ -34,7 +34,6 @@ module Elastic
34
34
  raise ArgumentError, "Required parameter 'body (enabled)' missing" unless arguments[:body]
35
35
 
36
36
  body = arguments.delete(:body) || {}
37
-
38
37
  headers = arguments.delete(:headers) || {}
39
38
  request(
40
39
  :put,
@@ -58,8 +58,6 @@ module Elastic
58
58
  # @option options [String] :proxy url of proxy to use, ex: "http://localhost:8888"
59
59
  # @option options [Boolean] :log Use the default logger (disabled by default)
60
60
  # @option arguments [Object] :logger An instance of a Logger-compatible object
61
- # @option arguments [Boolean] :trace Use the default tracer (disabled by default)
62
- # @option arguments [Object] :tracer An instance of a Logger-compatible object
63
61
  # @option arguments [Symbol] :adapter A specific adapter for Faraday (e.g. `:patron`)
64
62
  # @option enable_meta_header [Boolean] :enable_meta_header Enable sending the meta data header to Cloud.
65
63
  # (Default: true)
@@ -79,9 +77,7 @@ module Elastic
79
77
  transport_options: {
80
78
  request: { open_timeout: open_timeout }
81
79
  },
82
- enable_meta_header: @options[:enable_meta_header] || true,
83
- trace: trace,
84
- tracer: tracer
80
+ enable_meta_header: @options[:enable_meta_header] || true
85
81
  )
86
82
  end
87
83
 
@@ -113,14 +109,6 @@ module Elastic
113
109
  @options[:adapter]
114
110
  end
115
111
 
116
- def tracer
117
- @options[:tracer]
118
- end
119
-
120
- def trace
121
- @options[:trace]
122
- end
123
-
124
112
  def host
125
113
  return DEFAULT_HOST unless @options[:host]
126
114
 
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- VERSION = '8.0.1'
22
+ VERSION = '8.1.0'
23
23
  end
24
24
  end
@@ -27,17 +27,12 @@ module Elastic
27
27
  include Elastic::EnterpriseSearch::WorkplaceSearch::Actions
28
28
  include Elastic::EnterpriseSearch::Utils
29
29
 
30
- attr_accessor :kibana_url
31
-
32
30
  # Create a new Elastic::EnterpriseSearch::WorkplaceSearch::Client client
33
31
  #
34
32
  # @param options [Hash] a hash of configuration options
35
33
  # @option options [String] :access_token the access token for workplace search
36
34
  # @option options [String] :endpoint the endpoint Workplace Search
37
- # @option options [String] :kibana_url The base URL of your Kibana instance
38
- #
39
35
  def initialize(options = {})
40
- @kibana_url = options[:kibana_url]
41
36
  super(options)
42
37
  end
43
38
 
@@ -50,11 +45,9 @@ module Elastic
50
45
  end
51
46
 
52
47
  def authorization_url(client_id, redirect_uri)
53
- raise ArgumentError, 'kibana_url The base URL of your Kibana instance must be set in the client' unless kibana_url
54
-
55
48
  [
56
- kibana_url,
57
- '/app/enterprise_search/workplace_search/p/oauth/authorize?',
49
+ host,
50
+ '/ws/oauth/authorize?',
58
51
  'response_type=code&',
59
52
  "client_id=#{client_id}&",
60
53
  "redirect_uri=#{CGI.escape(redirect_uri)}"
@@ -91,18 +91,10 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
91
91
  context 'OAuth' do
92
92
  let(:client) { Elastic::EnterpriseSearch::WorkplaceSearch::Client.new(host: host) }
93
93
 
94
- it 'generates an authorization url when kibana url has been set' do
95
- client.kibana_url = 'http://localhost:5601'
96
- authorization_url = "#{client.kibana_url}/app/enterprise_search/workplace_search/p/oauth/authorize?" \
97
- 'response_type=code&client_id=client_id&redirect_uri=https%3A%2F%2Flocalhost%3A3002'
94
+ it 'generates an authorization url' do
95
+ authorization_url = 'http://localhost:3002/ws/oauth/authorize?response_type=code&client_id=client_id&redirect_uri=https%3A%2F%2Flocalhost%3A3002'
98
96
  expect(client.authorization_url('client_id', 'https://localhost:3002')).to eq authorization_url
99
97
  end
100
-
101
- it 'raises an error when kibana url is not set' do
102
- expect do
103
- client.authorization_url('client_id', 'https://localhost:3002')
104
- end.to raise_exception(ArgumentError)
105
- end
106
98
  end
107
99
 
108
100
  context 'adapters' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic-enterprise-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.1
4
+ version: 8.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-23 00:00:00.000000000 Z
11
+ date: 2022-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -164,8 +164,6 @@ files:
164
164
  - ".ci/functions/imports.sh"
165
165
  - ".ci/functions/wait-for-container.sh"
166
166
  - ".ci/jobs/defaults.yml"
167
- - ".ci/jobs/elastic+enterprise-search-ruby+7.13.yml"
168
- - ".ci/jobs/elastic+enterprise-search-ruby+7.14.yml"
169
167
  - ".ci/jobs/elastic+enterprise-search-ruby+7.15.yml"
170
168
  - ".ci/jobs/elastic+enterprise-search-ruby+7.16.yml"
171
169
  - ".ci/jobs/elastic+enterprise-search-ruby+main.yml"
@@ -208,6 +206,7 @@ files:
208
206
  - docs/guide/release_notes/716.asciidoc
209
207
  - docs/guide/release_notes/717.asciidoc
210
208
  - docs/guide/release_notes/80.asciidoc
209
+ - docs/guide/release_notes/81.asciidoc
211
210
  - docs/guide/release_notes/index.asciidoc
212
211
  - docs/guide/workplace-search-api.asciidoc
213
212
  - elastic-enterprise-search.gemspec
@@ -415,7 +414,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
415
414
  - !ruby/object:Gem::Version
416
415
  version: '0'
417
416
  requirements: []
418
- rubygems_version: 3.3.7
417
+ rubygems_version: 3.3.3
419
418
  signing_key:
420
419
  specification_version: 4
421
420
  summary: Official API client for Elastic Enterprise Search
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+7.13
4
- display-name: 'elastic / enterprise-search-ruby # 7.13'
5
- description: Testing the enterprise-search-ruby 7.13 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/7.13
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)
@@ -1,12 +0,0 @@
1
- ---
2
- - job:
3
- name: elastic+enterprise-search-ruby+7.14
4
- display-name: 'elastic / enterprise-search-ruby # 7.14'
5
- description: Testing the enterprise-search-ruby 7.14 branch.
6
- junit_results: "*-junit.xml"
7
- parameters:
8
- - string:
9
- name: branch_specifier
10
- default: refs/heads/7.14
11
- description: the Git branch specifier to build (&lt;branchName&gt;, &lt;tagName&gt;,
12
- &lt;commitId&gt;, etc.)