elastic-enterprise-search 8.0.0.pre → 8.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 934f9963f52322f3ebfe4d938047fda1ab1bde21295bc48e9ff395fd04552b63
4
- data.tar.gz: 93ee0ede64ccefd718b271ff50b179c2bf47cb531b5a9a09dd4ac9a06d32b803
3
+ metadata.gz: fe3de694901dc1b16bef977ae8e1c5fbe17da770daa14cf59fbbe3c46588331a
4
+ data.tar.gz: ca7d3672c8d91810d5ae0589f444ebc3992b7cb4673729b7c45e1e3184a43555
5
5
  SHA512:
6
- metadata.gz: e762a601ada260c8a919af6bb65de7c48142200c585b55bf017e411272a3b653a9bb102ee79573eb3912aee96ea7511be4d51ad031ddb5112ad33e5ce396aca4
7
- data.tar.gz: f8c8e04a2b3945a5e93f372beebd466ab4012625d0eea98132c2b2b89295e8bc3b84e99cfb1b0ec919b437b3244b2a7de9dcdca6149887940eb81c190d592514
6
+ metadata.gz: 580b81ecdca1b5e7522b3a5b54e237b29bccad3d99b93af9161c0f54196e4960436208b463f7dd6b416faef68e048c4c1b7bb4efe1429fcf7601184b0df35384
7
+ data.tar.gz: 05d5729c7254f93b0ca8b77a4400195b72854bf9973c2a499b23b90b2ecae8c20d82dc97fa68f2a05a7947305deab8d0578b92fc89b224a8c23395fdedfb0388
@@ -8,7 +8,7 @@ This document includes examples for different API requests. Please refer to the
8
8
  [source,rb]
9
9
  ----------------------------
10
10
  # Create an engine
11
- client.create_engine(name: 'videogames')
11
+ client.create_engine(body: { name: 'videogames' })
12
12
 
13
13
  # List all engines
14
14
  client.list_engines
@@ -30,7 +30,7 @@ body = {
30
30
  type: 'meta',
31
31
  source_engines: [ 'books', 'videogames' ]
32
32
  }
33
- client.create_engine(name: engine_name, body: body)
33
+ client.create_engine(body: body)
34
34
 
35
35
  # Add a source engine to a meta engine:
36
36
  client.add_meta_engine_source(meta_engine_name, source_engines: ['engine1', 'engine2'])
@@ -184,13 +184,6 @@ client.delete_api_key(api_key_name: name)
184
184
 
185
185
  === Web Crawler
186
186
 
187
- [CAUTION]
188
- ====
189
- The Elastic Enterprise Search web crawler API is a *beta* feature.
190
- Beta features are subject to change and are not covered by the support SLA of general release (GA) features.
191
- Elastic plans to promote this feature to GA in a future release.
192
- ====
193
-
194
187
  See https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html[Web Crawler API reference] for more information.
195
188
 
196
189
  [source,rb]
@@ -202,6 +195,9 @@ client.create_crawler_domain(engine_name, body: body)
202
195
  # Get crawler domain information
203
196
  client.crawler_domain(engine_name, domain_id: domain_id)
204
197
 
198
+ # List crawler domains
199
+ client.list_crawler_domains(engine_name)
200
+
205
201
  # Update a crawler domain
206
202
  body = { name: 'https://www.wikipedia.org' }
207
203
  client.put_crawler_domain(engine_name, domain_id: domain_id, domain: body)
@@ -308,6 +304,38 @@ client.crawler_process_crawl_denied_urls(engine_name, process_crawl_id: id)
308
304
  client.delete_crawler_active_crawl_request(engine_name)
309
305
  ----------------------------
310
306
 
307
+ === Adaptive Relevance Suggestions
308
+
309
+ [source,rb]
310
+ ----------------------------
311
+ # Update an adaptive relevance suggestion
312
+ body = [{ query: 'forest', type: 'curation', status: 'applied' }]
313
+ client.put_adaptive_relevance_suggestions(engine_name, body: body)
314
+
315
+ # Retrieve an adaptive relevance suggestion
316
+ client.adaptive_relevance_suggestions(engine_name, search_suggestion_query: 'test')
317
+
318
+ # List adaptive relevance suggestions
319
+ client.list_adaptive_relevance_suggestions(engine_name)
320
+ ----------------------------
321
+
322
+ === Adaptive Relevance Settings
323
+
324
+ [source,rb]
325
+ ----------------------------
326
+ # Show the settings for an engine
327
+ client.adaptive_relevance_settings(engine_name)
328
+
329
+ # Update relevance settings
330
+ body = {
331
+ curation: { enabled: true }
332
+ }
333
+ client.put_adaptive_relevance_settings(engine_name, body: body)
334
+
335
+ # Refresh adaptive relevance update process
336
+ client.refresh_adaptive_relevance_update_process(engine_name, adaptive_relevance_suggestion_type: 'curation')
337
+ ----------------------------
338
+
311
339
  === Other API Endpoints
312
340
 
313
341
  [source,rb]
@@ -1,14 +1,117 @@
1
1
  [[release_notes_80]]
2
- === 8.0.0.pre Release notes
2
+ === 8.0.0 Release notes
3
3
 
4
4
  [discrete]
5
5
  ==== General
6
6
 
7
- This is a pre-release for the upcoming `8.x` versions of the client.
7
+ First release in the `8.x` branch of the client.
8
8
 
9
9
  - Tested with Elastic Enterprise Search API version 8.0-SNAPSHOT.
10
- - Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3.
11
- - Updates request to return an Elastic::API::Response object.
10
+ - 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.
11
+ - 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.
12
+ - API: An updated generator is being used to generate the endpoint code. The source code documentation has better typing hints for parameters.
12
13
 
13
- Full release notes will be released with 8.0.0 GA.
14
+ [discrete]
15
+ ==== Response Object
16
+
17
+ * 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:
18
+
19
+ +
20
+ [source,rb]
21
+ ----------------------------
22
+ client = Elastic::EnterpriseSearch::Client.new(
23
+ host: 'http://localhost:3002',
24
+ http_auth: {user: 'elastic', password: 'changeme'}
25
+ )
26
+ response = client.health
27
+ response.class
28
+ # => Elastic::API::Response
29
+ response['version']['number']
30
+ # => "8.1.4"
31
+ response.body['version']['number']
32
+ # => "8.1.4"
33
+ response.status
34
+ # => 200
35
+ response.headers
36
+ # =>
37
+ {"date"=>"Tue, 10 May 2022 09:01:10 GMT",
38
+ "content-type"=>"application/json;charset=utf-8",
39
+ "etag"=>"W/\"etag--gzip\"",
40
+ "cache-control"=>"max-age=0, private, must-revalidate",
41
+ "x-request-id"=>"id",
42
+ "x-runtime"=>"0.023468",
43
+ "vary"=>"Accept-Encoding, User-Agent",
44
+ "content-length"=>"755",
45
+ "server"=>"Jetty(9.4.43.v20210629)"}
46
+ ----------------------------
47
+
48
+ [discrete]
49
+ ==== App Search
50
+
51
+ [discrete]
52
+ ===== API Changes
53
+
54
+ - 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.
55
+ - 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`).
56
+ - Curations API: parameters for `create_curation` and `put_curation` must be passed in inside the body parameter now.
57
+ - Engine APIs: `create_engine` removes the `name` parameter. It must be passed in inside the body parameter now.
58
+ - Log Click: `log_clickthrough` now requires `body`, the parameter `query` and `document_id` are required.
59
+ - 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.
60
+ - 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`.
61
+
62
+ [discrete]
63
+ ===== New APIs
64
+
65
+ * `list_crawler_domain`: Lists crawler domains given an engine.
66
+ * Adaptive Relevance Suggestion APIs:
67
+ ** `adaptive_relevance_suggestions` - Retrieves adaptive relevance for a single query.
68
+ ** `list_adaptive_relevance_suggestions` - List the adaptive relevance suggestions for a given engine.
69
+ ** `put_adaptive_relevance_suggestions` - Update adaptive relevance.
70
+ * Adaptive Relevance Settings APIs:
71
+ ** `adaptive_relevance_settings` - Retrieve adaptive relevance settings.
72
+ ** `put_adaptive_relevance_settings` - Update adaptive relevance settings.
73
+ ** `refresh_adaptive_relevance_update_process` - Update suggestions process refresh.
14
74
 
75
+ [discrete]
76
+ ==== Enterprise Search
77
+
78
+ - Read-Only API: `put_read_only` body is now required with the enabled object: `{enabled: true|false}`.
79
+ - APIs where `body` has been removed since it's not used: `health`, `read_only`, `stats`, `version`.
80
+
81
+ [discrete]
82
+ ==== Workplace Search
83
+
84
+ [discrete]
85
+ ===== API Changes
86
+
87
+ * Permissions APIs have been removed: `add_user_permissions`, `list_permissions`, `put_user_permissions`, `remove_user_permissions`, `user_permissions`.
88
+ * `current_user` removed `get_token` parameter.
89
+ * Analytics: `create_analytics_events` will raise ArgumentError if body is missing (Required: type, query_id, page, content_source_id, document_id, rank)
90
+ * 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.
91
+ * External Identities: `create_external_identity` will raise ArgumentError if body is missing (Required: external_user_id, external_user_properties, permissions). Body parameters have changed:
92
+
93
+ +
94
+ [source,rb]
95
+ ----------------------------
96
+ body = {
97
+ external_user_id: external_user_id,
98
+ permissions: [],
99
+ external_user_properties: [
100
+ 'attribute_name' => '_elasticsearch_username',
101
+ 'attribute_value' => 'fernando'
102
+ ]
103
+ }
104
+ client.create_external_identity(content_source_id, body: body)
105
+ ----------------------------
106
+ +
107
+ In `delete_external_identity`, `external_identity` and `put_external_identity` the required parameter changed from `user` to `external_user_id`.
108
+ See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-external-identities-api.html
109
+ * Search: Parameters need to be passed in via body to `search`. It will raise ArgumentError if body is missing.
110
+ * Documents: `delete_documents` will raise ArgumentError if body is missing (Required document_ids).
111
+ * Sync Jobs: `command_sync_jobs` will raise ArgumentError if body is missing.
112
+ * Synonyms: `create_batch_synonym_sets`, `put_synonym_set` will raise ArgumentError if body is missing.
113
+ * 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`.
114
+
115
+ [discrete]
116
+ ===== New APIs
117
+ - `list_documents`: Lists documents from a custom content source.
@@ -1,12 +1,9 @@
1
1
  [[release_notes]]
2
2
  == Release Notes
3
3
 
4
-
5
4
  [discrete]
6
5
  === 8.x
7
-
8
- * <<release_notes_80, 8.0.0.pre Release Notes>>
9
-
6
+ * <<release_notes_80, 8.0.0 Release Notes>>
10
7
 
11
8
  [discrete]
12
9
  === 7.x
@@ -6,10 +6,10 @@
6
6
  [source,rb]
7
7
  ----------------------------
8
8
  # Create a custom content source
9
- client.create_content_source(name: 'test')
9
+ client.create_content_source(body: { name: 'test' })
10
10
 
11
11
  # Retrieve a content source by ID
12
- content_source_id = client.create_content_source(name: 'books').body['id']
12
+ content_source_id = client.create_content_source(body: { name: 'books' }).body['id']
13
13
  client.content_source(content_source_id)
14
14
 
15
15
  # Delete a content source by ID
@@ -59,6 +59,9 @@ response = client.index_documents(content_source_id, body: documents)
59
59
  # Retrieve a document by ID from a specified content source
60
60
  client.document(content_source_id, document_id: '75015d85370d')
61
61
 
62
+ # List documents from a custom content source
63
+ client.list_documents(content_source_id)
64
+
62
65
  # Delete Documents
63
66
  client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])
64
67
 
@@ -136,21 +139,28 @@ client.remove_user_permissions(
136
139
  [source,rb]
137
140
  ----------------------------
138
141
  # Create external identities
139
- body = { user: 'elastic_user', source_user_id: 'example@elastic.co' }
142
+ body = {
143
+ external_user_id: external_user_id,
144
+ permissions: [],
145
+ external_user_properties: [
146
+ 'attribute_name' => '_elasticsearch_username',
147
+ 'attribute_value' => 'fernando'
148
+ ]
149
+ }
140
150
  client.create_external_identity(content_source_id, body: body)
141
151
 
142
152
  # Retrieve an external identity
143
- client.external_identity(content_source_id, user: 'elastic_user')
153
+ client.external_identity(content_source_id, external_user_id: external_user_id)
144
154
 
145
155
  # List external identities
146
156
  client.list_external_identities(content_source_id)
147
157
 
148
158
  # Update external identity
149
- body = { source_user_id: 'example2@elastic.co' }
150
- client.put_external_identity(content_source_id, user: 'elastic_user', body: body)
159
+ body = { external_user_id: external_user_id, permissions: ['permission1'] }
160
+ client.put_external_identity(content_source_id, external_user_id: external_user_id, body: body)
151
161
 
152
162
  # Delete an external identity
153
- client.delete_external_identity(content_source_id, user: 'elastic_user')
163
+ client.delete_external_identity(content_source_id, external_user_id: external_user_id)
154
164
  ----------------------------
155
165
 
156
166
  === Search
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- VERSION = '8.0.0.pre'
22
+ VERSION = '8.0.0'
23
23
  end
24
24
  end
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.0.pre
4
+ version: 8.0.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-09 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
@@ -411,9 +411,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
411
411
  version: '2.6'
412
412
  required_rubygems_version: !ruby/object:Gem::Requirement
413
413
  requirements:
414
- - - ">"
414
+ - - ">="
415
415
  - !ruby/object:Gem::Version
416
- version: 1.3.1
416
+ version: '0'
417
417
  requirements: []
418
418
  rubygems_version: 3.3.3
419
419
  signing_key: