elastic-enterprise-search 7.17.0 → 8.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/jobs/elastic+enterprise-search-ruby+7.15.yml +12 -0
- data/.ci/jobs/elastic+enterprise-search-ruby+7.16.yml +12 -0
- data/.ci/test-matrix.yml +1 -2
- data/.github/workflows/testing.yml +3 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG +1 -0
- data/CODE_OF_CONDUCT +1 -0
- data/CONTRIBUTING.md +37 -0
- data/NOTICE +2 -0
- data/README.md +25 -29
- data/docs/guide/app-search-api.asciidoc +52 -18
- data/docs/guide/overview.asciidoc +11 -3
- data/docs/guide/release_notes/712.asciidoc +10 -0
- data/docs/guide/release_notes/80.asciidoc +117 -0
- data/docs/guide/release_notes/81.asciidoc +8 -0
- data/docs/guide/release_notes/index.asciidoc +6 -0
- data/docs/guide/workplace-search-api.asciidoc +14 -7
- data/elastic-enterprise-search.gemspec +3 -3
- data/lib/elastic/api/response.rb +52 -0
- data/lib/elastic/{workplace-search/api/user_permissions.rb → app-search/api/adaptive_relevance_settings.rb} +10 -15
- data/lib/elastic/{workplace-search/api/add_user_permissions.rb → app-search/api/adaptive_relevance_suggestions.rb} +19 -14
- data/lib/elastic/app-search/api/add_meta_engine_source.rb +3 -5
- data/lib/elastic/app-search/api/api_key.rb +3 -6
- data/lib/elastic/app-search/api/api_logs.rb +7 -15
- data/lib/elastic/app-search/api/count_analytics.rb +4 -5
- data/lib/elastic/app-search/api/crawler_active_crawl_request.rb +4 -7
- data/lib/elastic/app-search/api/crawler_crawl_request.rb +5 -8
- data/lib/elastic/app-search/api/crawler_crawl_schedule.rb +4 -7
- data/lib/elastic/app-search/api/crawler_domain.rb +5 -8
- data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +5 -5
- data/lib/elastic/app-search/api/crawler_metrics.rb +3 -6
- data/lib/elastic/app-search/api/crawler_overview.rb +4 -7
- data/lib/elastic/app-search/api/crawler_process_crawl.rb +5 -8
- data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +5 -8
- data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +6 -7
- data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +6 -7
- data/lib/elastic/app-search/api/crawler_url_validation_result.rb +6 -7
- data/lib/elastic/app-search/api/crawler_user_agent.rb +3 -6
- data/lib/elastic/app-search/api/create_api_key.rb +9 -10
- data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +9 -5
- data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +12 -11
- data/lib/elastic/app-search/api/create_crawler_domain.rb +7 -8
- data/lib/elastic/app-search/api/create_crawler_entry_point.rb +9 -8
- data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +5 -6
- data/lib/elastic/app-search/api/create_crawler_sitemap.rb +9 -8
- data/lib/elastic/app-search/api/create_curation.rb +9 -8
- data/lib/elastic/app-search/api/create_engine.rb +7 -7
- data/lib/elastic/app-search/api/create_synonym_set.rb +5 -6
- data/lib/elastic/app-search/api/curation.rb +4 -7
- data/lib/elastic/app-search/api/delete_api_key.rb +3 -6
- data/lib/elastic/app-search/api/delete_crawler_active_crawl_request.rb +4 -7
- data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +6 -9
- data/lib/elastic/app-search/api/delete_crawler_crawl_schedule.rb +4 -7
- data/lib/elastic/app-search/api/delete_crawler_domain.rb +5 -8
- data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +6 -9
- data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +6 -9
- data/lib/elastic/app-search/api/delete_curation.rb +4 -7
- data/lib/elastic/app-search/api/delete_documents.rb +3 -5
- data/lib/elastic/app-search/api/delete_engine.rb +3 -6
- data/lib/elastic/app-search/api/delete_meta_engine_source.rb +3 -4
- data/lib/elastic/app-search/api/delete_synonym_set.rb +4 -7
- data/lib/elastic/app-search/api/documents.rb +4 -5
- data/lib/elastic/app-search/api/engine.rb +3 -6
- data/lib/elastic/app-search/api/index_documents.rb +3 -5
- data/lib/elastic/{workplace-search/api/remove_user_permissions.rb → app-search/api/list_adaptive_relevance_suggestions.rb} +12 -14
- data/lib/elastic/app-search/api/list_api_keys.rb +2 -5
- data/lib/elastic/app-search/api/list_crawler_crawl_requests.rb +6 -8
- data/lib/elastic/{workplace-search/api/list_permissions.rb → app-search/api/list_crawler_domains.rb} +12 -13
- data/lib/elastic/app-search/api/list_crawler_process_crawls.rb +6 -7
- data/lib/elastic/app-search/api/list_curations.rb +3 -6
- data/lib/elastic/app-search/api/list_documents.rb +3 -6
- data/lib/elastic/app-search/api/list_engines.rb +2 -5
- data/lib/elastic/app-search/api/list_synonym_sets.rb +3 -6
- data/lib/elastic/app-search/api/log_clickthrough.rb +8 -8
- data/lib/elastic/{workplace-search/api/put_user_permissions.rb → app-search/api/put_adaptive_relevance_settings.rb} +12 -14
- data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +50 -0
- data/lib/elastic/app-search/api/put_api_key.rb +10 -10
- data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +13 -12
- data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +7 -7
- data/lib/elastic/app-search/api/put_crawler_domain.rb +8 -9
- data/lib/elastic/app-search/api/put_crawler_entry_point.rb +10 -9
- data/lib/elastic/app-search/api/put_crawler_sitemap.rb +10 -9
- data/lib/elastic/app-search/api/put_curation.rb +10 -9
- data/lib/elastic/app-search/api/put_documents.rb +3 -4
- data/lib/elastic/app-search/api/put_schema.rb +3 -4
- data/lib/elastic/app-search/api/put_search_settings.rb +5 -6
- data/lib/elastic/app-search/api/put_synonym_set.rb +7 -8
- data/lib/elastic/app-search/api/query_suggestion.rb +4 -5
- data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +55 -0
- data/lib/elastic/app-search/api/reset_search_settings.rb +3 -6
- data/lib/elastic/app-search/api/schema.rb +3 -6
- data/lib/elastic/app-search/api/search.rb +5 -5
- data/lib/elastic/app-search/api/search_settings.rb +3 -6
- data/lib/elastic/app-search/api/synonym_set.rb +4 -7
- data/lib/elastic/app-search/api/top_clicks_analytics.rb +4 -5
- data/lib/elastic/app-search/api/top_queries_analytics.rb +3 -4
- data/lib/elastic/enterprise-search/api/health.rb +2 -3
- data/lib/elastic/enterprise-search/api/put_read_only.rb +5 -4
- data/lib/elastic/enterprise-search/api/read_only.rb +2 -3
- data/lib/elastic/enterprise-search/api/stats.rb +2 -3
- data/lib/elastic/enterprise-search/api/version.rb +2 -3
- data/lib/elastic/enterprise-search/client.rb +8 -13
- data/lib/elastic/enterprise-search/request.rb +5 -3
- data/lib/elastic/enterprise-search/version.rb +1 -1
- data/lib/elastic/workplace-search/api/auto_query_refinement_details.rb +3 -4
- data/lib/elastic/workplace-search/api/command_sync_jobs.rb +4 -5
- data/lib/elastic/workplace-search/api/content_source.rb +3 -4
- data/lib/elastic/workplace-search/api/create_analytics_event.rb +16 -12
- data/lib/elastic/workplace-search/api/create_batch_synonym_sets.rb +4 -3
- data/lib/elastic/workplace-search/api/create_content_source.rb +6 -5
- data/lib/elastic/workplace-search/api/create_external_identity.rb +11 -6
- data/lib/elastic/workplace-search/api/current_user.rb +3 -5
- data/lib/elastic/workplace-search/api/delete_content_source.rb +3 -4
- data/lib/elastic/workplace-search/api/delete_documents.rb +4 -4
- data/lib/elastic/workplace-search/api/delete_documents_by_query.rb +4 -3
- data/lib/elastic/workplace-search/api/delete_external_identity.rb +7 -9
- data/lib/elastic/workplace-search/api/delete_synonym_set.rb +3 -5
- data/lib/elastic/workplace-search/api/document.rb +4 -6
- data/lib/elastic/workplace-search/api/external_identity.rb +7 -9
- data/lib/elastic/workplace-search/api/index_documents.rb +3 -4
- data/lib/elastic/workplace-search/api/list_content_sources.rb +2 -3
- data/lib/elastic/workplace-search/api/list_documents.rb +4 -5
- data/lib/elastic/workplace-search/api/list_external_identities.rb +3 -4
- data/lib/elastic/workplace-search/api/list_synonym_sets.rb +1 -2
- data/lib/elastic/workplace-search/api/put_content_source.rb +6 -6
- data/lib/elastic/workplace-search/api/put_content_source_icons.rb +6 -6
- data/lib/elastic/workplace-search/api/put_external_identity.rb +11 -10
- data/lib/elastic/workplace-search/api/put_synonym_set.rb +4 -4
- data/lib/elastic/workplace-search/api/put_triggers_blocklist.rb +3 -5
- data/lib/elastic/workplace-search/api/search.rb +13 -13
- data/lib/elastic/workplace-search/api/synonym_set.rb +3 -5
- data/lib/elastic/workplace-search/api/triggers_blocklist.rb +3 -3
- data/spec/app-search/client_spec.rb +29 -0
- data/spec/enterprise-search/client_spec.rb +29 -0
- data/spec/enterprise-search/request_spec.rb +1 -1
- data/spec/integration/app-search/adaptive_relevance_settings_spec.rb +60 -0
- data/spec/integration/app-search/adaptive_relevance_suggestions_spec.rb +54 -0
- data/spec/integration/app-search/api_logs_spec.rb +11 -3
- data/spec/integration/app-search/app_search_helper.rb +2 -2
- data/spec/integration/app-search/count_analytics_spec.rb +3 -2
- data/spec/integration/app-search/crawler_domain_spec.rb +16 -0
- data/spec/integration/app-search/curations_spec.rb +15 -9
- data/spec/integration/app-search/engines_spec.rb +24 -26
- data/spec/integration/app-search/log_clickthrough_spec.rb +1 -1
- data/spec/integration/app-search/meta_engines_spec.rb +5 -5
- data/spec/integration/app-search/search_and_multiple_search_spec.rb +1 -1
- data/spec/integration/workplace-search/content_sources_spec.rb +6 -6
- data/spec/integration/workplace-search/documents_spec.rb +20 -10
- data/spec/integration/workplace-search/external_identities_spec.rb +26 -16
- data/spec/integration/workplace-search/triggers_spec.rb +2 -2
- data/spec/integration/workplace-search/users_spec.rb +0 -6
- data/spec/workplace-search/client_spec.rb +29 -0
- metadata +27 -19
- data/.ci/jobs/elastic+enterprise-search-ruby+7.10.0.beta.1.yml +0 -12
- data/.github/compatibility/Gemfile +0 -23
- data/.github/workflows/compatibility.yml +0 -20
- data/spec/integration/workplace-search/permissions_spec.rb +0 -77
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-enterprise-search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
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-
|
11
|
+
date: 2022-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: elastic-transport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 8.0.0.pre.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 8.0.0.pre.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jwt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +106,14 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 1
|
109
|
+
version: '1'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: 1
|
116
|
+
version: '1'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: vcr
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,7 +164,8 @@ 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.
|
167
|
+
- ".ci/jobs/elastic+enterprise-search-ruby+7.15.yml"
|
168
|
+
- ".ci/jobs/elastic+enterprise-search-ruby+7.16.yml"
|
168
169
|
- ".ci/jobs/elastic+enterprise-search-ruby+main.yml"
|
169
170
|
- ".ci/jobs/elastic+enterprise-search-ruby+pull-request.yml"
|
170
171
|
- ".ci/make.sh"
|
@@ -175,17 +176,18 @@ files:
|
|
175
176
|
- ".ci/run-tests"
|
176
177
|
- ".ci/test-matrix.yml"
|
177
178
|
- ".github/check_license_headers.rb"
|
178
|
-
- ".github/compatibility/Gemfile"
|
179
179
|
- ".github/license-header.txt"
|
180
|
-
- ".github/workflows/compatibility.yml"
|
181
180
|
- ".github/workflows/license.yml"
|
182
181
|
- ".github/workflows/rubocop.yml"
|
183
182
|
- ".github/workflows/testing.yml"
|
184
183
|
- ".gitignore"
|
185
184
|
- ".rubocop.yml"
|
185
|
+
- CHANGELOG
|
186
|
+
- CODE_OF_CONDUCT
|
186
187
|
- CONTRIBUTING.md
|
187
188
|
- Gemfile
|
188
189
|
- LICENSE
|
190
|
+
- NOTICE
|
189
191
|
- README.md
|
190
192
|
- Rakefile
|
191
193
|
- docs/guide/app-search-api.asciidoc
|
@@ -203,12 +205,17 @@ files:
|
|
203
205
|
- docs/guide/release_notes/715.asciidoc
|
204
206
|
- docs/guide/release_notes/716.asciidoc
|
205
207
|
- docs/guide/release_notes/717.asciidoc
|
208
|
+
- docs/guide/release_notes/80.asciidoc
|
209
|
+
- docs/guide/release_notes/81.asciidoc
|
206
210
|
- docs/guide/release_notes/index.asciidoc
|
207
211
|
- docs/guide/workplace-search-api.asciidoc
|
208
212
|
- elastic-enterprise-search.gemspec
|
209
213
|
- lib/data/ca-bundle.crt
|
210
214
|
- lib/elastic-enterprise-search.rb
|
211
215
|
- lib/elastic/.rubocop.yml
|
216
|
+
- lib/elastic/api/response.rb
|
217
|
+
- lib/elastic/app-search/api/adaptive_relevance_settings.rb
|
218
|
+
- lib/elastic/app-search/api/adaptive_relevance_suggestions.rb
|
212
219
|
- lib/elastic/app-search/api/add_meta_engine_source.rb
|
213
220
|
- lib/elastic/app-search/api/api_key.rb
|
214
221
|
- lib/elastic/app-search/api/api_logs.rb
|
@@ -254,8 +261,10 @@ files:
|
|
254
261
|
- lib/elastic/app-search/api/documents.rb
|
255
262
|
- lib/elastic/app-search/api/engine.rb
|
256
263
|
- lib/elastic/app-search/api/index_documents.rb
|
264
|
+
- lib/elastic/app-search/api/list_adaptive_relevance_suggestions.rb
|
257
265
|
- lib/elastic/app-search/api/list_api_keys.rb
|
258
266
|
- lib/elastic/app-search/api/list_crawler_crawl_requests.rb
|
267
|
+
- lib/elastic/app-search/api/list_crawler_domains.rb
|
259
268
|
- lib/elastic/app-search/api/list_crawler_process_crawls.rb
|
260
269
|
- lib/elastic/app-search/api/list_curations.rb
|
261
270
|
- lib/elastic/app-search/api/list_documents.rb
|
@@ -263,6 +272,8 @@ files:
|
|
263
272
|
- lib/elastic/app-search/api/list_synonym_sets.rb
|
264
273
|
- lib/elastic/app-search/api/log_clickthrough.rb
|
265
274
|
- lib/elastic/app-search/api/multi_search.rb
|
275
|
+
- lib/elastic/app-search/api/put_adaptive_relevance_settings.rb
|
276
|
+
- lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb
|
266
277
|
- lib/elastic/app-search/api/put_api_key.rb
|
267
278
|
- lib/elastic/app-search/api/put_crawler_crawl_rule.rb
|
268
279
|
- lib/elastic/app-search/api/put_crawler_crawl_schedule.rb
|
@@ -275,6 +286,7 @@ files:
|
|
275
286
|
- lib/elastic/app-search/api/put_search_settings.rb
|
276
287
|
- lib/elastic/app-search/api/put_synonym_set.rb
|
277
288
|
- lib/elastic/app-search/api/query_suggestion.rb
|
289
|
+
- lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb
|
278
290
|
- lib/elastic/app-search/api/reset_search_settings.rb
|
279
291
|
- lib/elastic/app-search/api/schema.rb
|
280
292
|
- lib/elastic/app-search/api/search.rb
|
@@ -295,7 +307,6 @@ files:
|
|
295
307
|
- lib/elastic/enterprise-search/utils.rb
|
296
308
|
- lib/elastic/enterprise-search/version.rb
|
297
309
|
- lib/elastic/enterprise_search.rb
|
298
|
-
- lib/elastic/workplace-search/api/add_user_permissions.rb
|
299
310
|
- lib/elastic/workplace-search/api/auto_query_refinement_details.rb
|
300
311
|
- lib/elastic/workplace-search/api/command_sync_jobs.rb
|
301
312
|
- lib/elastic/workplace-search/api/content_source.rb
|
@@ -316,19 +327,15 @@ files:
|
|
316
327
|
- lib/elastic/workplace-search/api/list_content_sources.rb
|
317
328
|
- lib/elastic/workplace-search/api/list_documents.rb
|
318
329
|
- lib/elastic/workplace-search/api/list_external_identities.rb
|
319
|
-
- lib/elastic/workplace-search/api/list_permissions.rb
|
320
330
|
- lib/elastic/workplace-search/api/list_synonym_sets.rb
|
321
331
|
- lib/elastic/workplace-search/api/put_content_source.rb
|
322
332
|
- lib/elastic/workplace-search/api/put_content_source_icons.rb
|
323
333
|
- lib/elastic/workplace-search/api/put_external_identity.rb
|
324
334
|
- lib/elastic/workplace-search/api/put_synonym_set.rb
|
325
335
|
- lib/elastic/workplace-search/api/put_triggers_blocklist.rb
|
326
|
-
- lib/elastic/workplace-search/api/put_user_permissions.rb
|
327
|
-
- lib/elastic/workplace-search/api/remove_user_permissions.rb
|
328
336
|
- lib/elastic/workplace-search/api/search.rb
|
329
337
|
- lib/elastic/workplace-search/api/synonym_set.rb
|
330
338
|
- lib/elastic/workplace-search/api/triggers_blocklist.rb
|
331
|
-
- lib/elastic/workplace-search/api/user_permissions.rb
|
332
339
|
- lib/elastic/workplace-search/workplace_search.rb
|
333
340
|
- rake_tasks/unified_release_tasks.rake
|
334
341
|
- spec/app-search/client_spec.rb
|
@@ -339,6 +346,8 @@ files:
|
|
339
346
|
- spec/fixtures/vcr/workplace_search/create_analytics_event.yml
|
340
347
|
- spec/fixtures/vcr/workplace_search/oauth_request_token.yml
|
341
348
|
- spec/fixtures/vcr/workplace_search/search_request.yml
|
349
|
+
- spec/integration/app-search/adaptive_relevance_settings_spec.rb
|
350
|
+
- spec/integration/app-search/adaptive_relevance_suggestions_spec.rb
|
342
351
|
- spec/integration/app-search/api_key_spec.rb
|
343
352
|
- spec/integration/app-search/api_logs_spec.rb
|
344
353
|
- spec/integration/app-search/app_search_helper.rb
|
@@ -372,7 +381,6 @@ files:
|
|
372
381
|
- spec/integration/workplace-search/documents_spec.rb
|
373
382
|
- spec/integration/workplace-search/external_identities_spec.rb
|
374
383
|
- spec/integration/workplace-search/icon.png
|
375
|
-
- spec/integration/workplace-search/permissions_spec.rb
|
376
384
|
- spec/integration/workplace-search/synonym_sets_spec.rb
|
377
385
|
- spec/integration/workplace-search/triggers_spec.rb
|
378
386
|
- spec/integration/workplace-search/users_spec.rb
|
@@ -399,7 +407,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
399
407
|
requirements:
|
400
408
|
- - ">="
|
401
409
|
- !ruby/object:Gem::Version
|
402
|
-
version: '2.
|
410
|
+
version: '2.6'
|
403
411
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
404
412
|
requirements:
|
405
413
|
- - ">="
|
@@ -1,12 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- job:
|
3
|
-
name: elastic+enterprise-search-ruby+7.10.0.beta.1
|
4
|
-
display-name: 'elastic / enterprise-search-ruby # 7.10.0.beta.1'
|
5
|
-
description: Testing the enterprise-search-ruby 7.10.0.beta.1 branch.
|
6
|
-
junit_results: "*-junit.xml"
|
7
|
-
parameters:
|
8
|
-
- string:
|
9
|
-
name: branch_specifier
|
10
|
-
default: refs/heads/7.10.0.beta.1
|
11
|
-
description: the Git branch specifier to build (<branchName>, <tagName>,
|
12
|
-
<commitId>, etc.)
|
@@ -1,23 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
# frozen_string_literal: true
|
19
|
-
|
20
|
-
source 'https://rubygems.org'
|
21
|
-
|
22
|
-
gem 'elasticsearch', ENV['es-version']
|
23
|
-
gem 'elastic-enterprise-search', path: File.expand_path('../../', __dir__)
|
@@ -1,20 +0,0 @@
|
|
1
|
-
name: Compatibility with Elasticsearch
|
2
|
-
on: [push, pull_request]
|
3
|
-
|
4
|
-
jobs:
|
5
|
-
elasticsearch:
|
6
|
-
env:
|
7
|
-
ES_VERSION: ${{ matrix.es_version }}
|
8
|
-
strategy:
|
9
|
-
matrix:
|
10
|
-
es_version: [ 7.11, 7.12, 7.13, 7.14, 7.15, 7.16 ]
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v2
|
14
|
-
- uses: ruby/setup-ruby@v1
|
15
|
-
with:
|
16
|
-
ruby-version: 3.1
|
17
|
-
- name: Build Gemfile with Elasticsearch gem
|
18
|
-
run: |
|
19
|
-
ruby -v
|
20
|
-
cd ./.github/compatibility/ && bundle
|
@@ -1,77 +0,0 @@
|
|
1
|
-
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
-
# license agreements. See the NOTICE file distributed with
|
3
|
-
# this work for additional information regarding copyright
|
4
|
-
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
-
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
-
# not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing,
|
12
|
-
# software distributed under the License is distributed on an
|
13
|
-
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
-
# KIND, either express or implied. See the License for the
|
15
|
-
# specific language governing permissions and limitations
|
16
|
-
# under the License.
|
17
|
-
|
18
|
-
# frozen_string_literal: true
|
19
|
-
|
20
|
-
require_relative "#{__dir__}/workplace_search_helper.rb"
|
21
|
-
|
22
|
-
describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
|
23
|
-
context 'Permissions' do
|
24
|
-
let(:content_source_id) { client.create_content_source(name: 'my_content').body['id'] }
|
25
|
-
let(:user) { 'enterprise_search' }
|
26
|
-
let(:permissions) { ['permission1', 'permission2'] }
|
27
|
-
|
28
|
-
after do
|
29
|
-
client.put_user_permissions(content_source_id, { permissions: [], user: user })
|
30
|
-
delete_content_sources
|
31
|
-
end
|
32
|
-
|
33
|
-
it 'adds permissions to a user' do
|
34
|
-
response = client.add_user_permissions(
|
35
|
-
content_source_id,
|
36
|
-
{ permissions: permissions, user: user }
|
37
|
-
)
|
38
|
-
expect(response.status).to eq 200
|
39
|
-
expect(response.body).to eq({ 'user' => 'enterprise_search', 'permissions' => ['permission1', 'permission2'] })
|
40
|
-
end
|
41
|
-
|
42
|
-
it 'removes permissions from a user' do
|
43
|
-
client.add_user_permissions(content_source_id, { permissions: permissions, user: user })
|
44
|
-
|
45
|
-
# Removes Permissions
|
46
|
-
response = client.remove_user_permissions(
|
47
|
-
content_source_id,
|
48
|
-
{ permissions: permissions, user: user }
|
49
|
-
)
|
50
|
-
expect(response.status).to eq 200
|
51
|
-
expect(response.body).to eq({ 'user' => 'enterprise_search', 'permissions' => [] })
|
52
|
-
end
|
53
|
-
|
54
|
-
it 'lists permissions' do
|
55
|
-
response = client.list_permissions(content_source_id)
|
56
|
-
expect(response.status).to eq 200
|
57
|
-
end
|
58
|
-
|
59
|
-
it 'gets a user\'s permissions' do
|
60
|
-
client.add_user_permissions(content_source_id, { permissions: permissions, user: user })
|
61
|
-
response = client.user_permissions(content_source_id, { user: user })
|
62
|
-
expect(response.status).to eq 200
|
63
|
-
expect(response.body).to eq({ 'user' => 'enterprise_search', 'permissions' => permissions })
|
64
|
-
end
|
65
|
-
|
66
|
-
it 'updates a user\'s permissions' do
|
67
|
-
permissions = ['testing', 'more', 'permissions']
|
68
|
-
response = client.add_user_permissions(content_source_id, { permissions: permissions, user: user })
|
69
|
-
expect(response.status).to eq 200
|
70
|
-
expect(response.body).to eq({ 'user' => 'enterprise_search', 'permissions' => permissions })
|
71
|
-
|
72
|
-
response = client.put_user_permissions(content_source_id, { permissions: [], user: user })
|
73
|
-
expect(response.status).to eq 200
|
74
|
-
expect(response.body).to eq({ 'user' => 'enterprise_search', 'permissions' => [] })
|
75
|
-
end
|
76
|
-
end
|
77
|
-
end
|