elastic-enterprise-search 7.17.0 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (163) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/jobs/elastic+enterprise-search-ruby+7.13.yml +12 -0
  3. data/.ci/jobs/elastic+enterprise-search-ruby+7.14.yml +12 -0
  4. data/.ci/jobs/elastic+enterprise-search-ruby+7.15.yml +12 -0
  5. data/.ci/jobs/elastic+enterprise-search-ruby+7.16.yml +12 -0
  6. data/.ci/test-matrix.yml +1 -2
  7. data/.github/workflows/testing.yml +3 -3
  8. data/.rubocop.yml +1 -1
  9. data/CHANGELOG +1 -0
  10. data/CODE_OF_CONDUCT +1 -0
  11. data/CONTRIBUTING.md +37 -0
  12. data/NOTICE +2 -0
  13. data/README.md +25 -29
  14. data/docs/guide/app-search-api.asciidoc +52 -18
  15. data/docs/guide/connecting.asciidoc +0 -1
  16. data/docs/guide/overview.asciidoc +27 -4
  17. data/docs/guide/release_notes/712.asciidoc +10 -0
  18. data/docs/guide/release_notes/714.asciidoc +0 -12
  19. data/docs/guide/release_notes/715.asciidoc +0 -12
  20. data/docs/guide/release_notes/80.asciidoc +128 -0
  21. data/docs/guide/release_notes/index.asciidoc +4 -0
  22. data/docs/guide/workplace-search-api.asciidoc +38 -11
  23. data/elastic-enterprise-search.gemspec +3 -3
  24. data/lib/elastic/api/response.rb +52 -0
  25. data/lib/elastic/{workplace-search/api/user_permissions.rb → app-search/api/adaptive_relevance_settings.rb} +10 -15
  26. data/lib/elastic/{workplace-search/api/add_user_permissions.rb → app-search/api/adaptive_relevance_suggestions.rb} +20 -14
  27. data/lib/elastic/app-search/api/add_meta_engine_source.rb +4 -5
  28. data/lib/elastic/app-search/api/api_key.rb +4 -6
  29. data/lib/elastic/app-search/api/api_logs.rb +8 -15
  30. data/lib/elastic/app-search/api/count_analytics.rb +5 -5
  31. data/lib/elastic/app-search/api/crawler_active_crawl_request.rb +4 -7
  32. data/lib/elastic/app-search/api/crawler_crawl_request.rb +6 -8
  33. data/lib/elastic/app-search/api/crawler_crawl_schedule.rb +4 -7
  34. data/lib/elastic/app-search/api/crawler_domain.rb +6 -8
  35. data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +6 -5
  36. data/lib/elastic/app-search/api/crawler_metrics.rb +3 -6
  37. data/lib/elastic/app-search/api/crawler_overview.rb +4 -7
  38. data/lib/elastic/app-search/api/crawler_process_crawl.rb +6 -8
  39. data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +6 -8
  40. data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +6 -6
  41. data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +7 -7
  42. data/lib/elastic/app-search/api/crawler_url_validation_result.rb +7 -7
  43. data/lib/elastic/app-search/api/crawler_user_agent.rb +3 -6
  44. data/lib/elastic/app-search/api/create_api_key.rb +10 -10
  45. data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +9 -5
  46. data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +13 -11
  47. data/lib/elastic/app-search/api/create_crawler_domain.rb +8 -8
  48. data/lib/elastic/app-search/api/create_crawler_entry_point.rb +10 -8
  49. data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +6 -6
  50. data/lib/elastic/app-search/api/create_crawler_sitemap.rb +10 -8
  51. data/lib/elastic/app-search/api/create_curation.rb +10 -8
  52. data/lib/elastic/app-search/api/create_engine.rb +8 -7
  53. data/lib/elastic/app-search/api/create_synonym_set.rb +6 -6
  54. data/lib/elastic/app-search/api/curation.rb +5 -7
  55. data/lib/elastic/app-search/api/delete_api_key.rb +4 -6
  56. data/lib/elastic/app-search/api/delete_crawler_active_crawl_request.rb +4 -7
  57. data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +7 -9
  58. data/lib/elastic/app-search/api/delete_crawler_crawl_schedule.rb +4 -7
  59. data/lib/elastic/app-search/api/delete_crawler_domain.rb +6 -8
  60. data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +7 -9
  61. data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +7 -9
  62. data/lib/elastic/app-search/api/delete_curation.rb +5 -7
  63. data/lib/elastic/app-search/api/delete_documents.rb +4 -5
  64. data/lib/elastic/app-search/api/delete_engine.rb +3 -6
  65. data/lib/elastic/app-search/api/delete_meta_engine_source.rb +4 -4
  66. data/lib/elastic/app-search/api/delete_synonym_set.rb +5 -7
  67. data/lib/elastic/app-search/api/documents.rb +5 -5
  68. data/lib/elastic/app-search/api/engine.rb +3 -6
  69. data/lib/elastic/app-search/api/index_documents.rb +4 -5
  70. data/lib/elastic/{workplace-search/api/remove_user_permissions.rb → app-search/api/list_adaptive_relevance_suggestions.rb} +13 -14
  71. data/lib/elastic/app-search/api/list_api_keys.rb +2 -5
  72. data/lib/elastic/app-search/api/list_crawler_crawl_requests.rb +6 -8
  73. data/lib/elastic/{workplace-search/api/list_permissions.rb → app-search/api/list_crawler_domains.rb} +12 -13
  74. data/lib/elastic/app-search/api/list_crawler_process_crawls.rb +6 -7
  75. data/lib/elastic/app-search/api/list_curations.rb +3 -6
  76. data/lib/elastic/app-search/api/list_documents.rb +3 -6
  77. data/lib/elastic/app-search/api/list_engines.rb +2 -5
  78. data/lib/elastic/app-search/api/list_synonym_sets.rb +3 -6
  79. data/lib/elastic/app-search/api/log_clickthrough.rb +9 -8
  80. data/lib/elastic/{workplace-search/api/put_user_permissions.rb → app-search/api/put_adaptive_relevance_settings.rb} +13 -14
  81. data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +51 -0
  82. data/lib/elastic/app-search/api/put_api_key.rb +11 -10
  83. data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +14 -12
  84. data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +8 -7
  85. data/lib/elastic/app-search/api/put_crawler_domain.rb +9 -9
  86. data/lib/elastic/app-search/api/put_crawler_entry_point.rb +11 -9
  87. data/lib/elastic/app-search/api/put_crawler_sitemap.rb +11 -9
  88. data/lib/elastic/app-search/api/put_curation.rb +11 -9
  89. data/lib/elastic/app-search/api/put_documents.rb +4 -4
  90. data/lib/elastic/app-search/api/put_schema.rb +4 -4
  91. data/lib/elastic/app-search/api/put_search_settings.rb +6 -6
  92. data/lib/elastic/app-search/api/put_synonym_set.rb +8 -8
  93. data/lib/elastic/app-search/api/query_suggestion.rb +5 -5
  94. data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +56 -0
  95. data/lib/elastic/app-search/api/reset_search_settings.rb +3 -6
  96. data/lib/elastic/app-search/api/schema.rb +3 -6
  97. data/lib/elastic/app-search/api/search.rb +6 -5
  98. data/lib/elastic/app-search/api/search_settings.rb +3 -6
  99. data/lib/elastic/app-search/api/synonym_set.rb +5 -7
  100. data/lib/elastic/app-search/api/top_clicks_analytics.rb +5 -5
  101. data/lib/elastic/app-search/api/top_queries_analytics.rb +4 -4
  102. data/lib/elastic/enterprise-search/api/health.rb +2 -3
  103. data/lib/elastic/enterprise-search/api/put_read_only.rb +6 -4
  104. data/lib/elastic/enterprise-search/api/read_only.rb +2 -3
  105. data/lib/elastic/enterprise-search/api/stats.rb +2 -3
  106. data/lib/elastic/enterprise-search/api/version.rb +2 -3
  107. data/lib/elastic/enterprise-search/client.rb +21 -14
  108. data/lib/elastic/enterprise-search/request.rb +5 -3
  109. data/lib/elastic/enterprise-search/version.rb +1 -1
  110. data/lib/elastic/workplace-search/api/auto_query_refinement_details.rb +3 -4
  111. data/lib/elastic/workplace-search/api/command_sync_jobs.rb +4 -5
  112. data/lib/elastic/workplace-search/api/content_source.rb +3 -4
  113. data/lib/elastic/workplace-search/api/create_analytics_event.rb +16 -12
  114. data/lib/elastic/workplace-search/api/create_batch_synonym_sets.rb +4 -3
  115. data/lib/elastic/workplace-search/api/create_content_source.rb +6 -5
  116. data/lib/elastic/workplace-search/api/create_external_identity.rb +11 -6
  117. data/lib/elastic/workplace-search/api/current_user.rb +3 -5
  118. data/lib/elastic/workplace-search/api/delete_content_source.rb +3 -4
  119. data/lib/elastic/workplace-search/api/delete_documents.rb +4 -4
  120. data/lib/elastic/workplace-search/api/delete_documents_by_query.rb +4 -3
  121. data/lib/elastic/workplace-search/api/delete_external_identity.rb +7 -9
  122. data/lib/elastic/workplace-search/api/delete_synonym_set.rb +3 -5
  123. data/lib/elastic/workplace-search/api/document.rb +4 -6
  124. data/lib/elastic/workplace-search/api/external_identity.rb +7 -9
  125. data/lib/elastic/workplace-search/api/index_documents.rb +3 -4
  126. data/lib/elastic/workplace-search/api/list_content_sources.rb +2 -3
  127. data/lib/elastic/workplace-search/api/list_documents.rb +4 -5
  128. data/lib/elastic/workplace-search/api/list_external_identities.rb +3 -4
  129. data/lib/elastic/workplace-search/api/list_synonym_sets.rb +1 -2
  130. data/lib/elastic/workplace-search/api/put_content_source.rb +6 -6
  131. data/lib/elastic/workplace-search/api/put_content_source_icons.rb +6 -6
  132. data/lib/elastic/workplace-search/api/put_external_identity.rb +11 -10
  133. data/lib/elastic/workplace-search/api/put_synonym_set.rb +4 -4
  134. data/lib/elastic/workplace-search/api/put_triggers_blocklist.rb +3 -5
  135. data/lib/elastic/workplace-search/api/search.rb +13 -13
  136. data/lib/elastic/workplace-search/api/synonym_set.rb +3 -5
  137. data/lib/elastic/workplace-search/api/triggers_blocklist.rb +3 -3
  138. data/lib/elastic/workplace-search/workplace_search.rb +9 -2
  139. data/spec/app-search/client_spec.rb +29 -0
  140. data/spec/enterprise-search/client_spec.rb +29 -0
  141. data/spec/enterprise-search/request_spec.rb +1 -1
  142. data/spec/integration/app-search/adaptive_relevance_settings_spec.rb +60 -0
  143. data/spec/integration/app-search/adaptive_relevance_suggestions_spec.rb +54 -0
  144. data/spec/integration/app-search/api_logs_spec.rb +11 -3
  145. data/spec/integration/app-search/app_search_helper.rb +2 -2
  146. data/spec/integration/app-search/count_analytics_spec.rb +3 -2
  147. data/spec/integration/app-search/crawler_domain_spec.rb +16 -0
  148. data/spec/integration/app-search/curations_spec.rb +15 -9
  149. data/spec/integration/app-search/engines_spec.rb +24 -26
  150. data/spec/integration/app-search/log_clickthrough_spec.rb +1 -1
  151. data/spec/integration/app-search/meta_engines_spec.rb +5 -5
  152. data/spec/integration/app-search/search_and_multiple_search_spec.rb +1 -1
  153. data/spec/integration/workplace-search/content_sources_spec.rb +6 -6
  154. data/spec/integration/workplace-search/documents_spec.rb +20 -10
  155. data/spec/integration/workplace-search/external_identities_spec.rb +26 -16
  156. data/spec/integration/workplace-search/triggers_spec.rb +2 -2
  157. data/spec/integration/workplace-search/users_spec.rb +0 -6
  158. data/spec/workplace-search/client_spec.rb +39 -2
  159. metadata +29 -20
  160. data/.ci/jobs/elastic+enterprise-search-ruby+7.10.0.beta.1.yml +0 -12
  161. data/.github/compatibility/Gemfile +0 -23
  162. data/.github/workflows/compatibility.yml +0 -20
  163. data/spec/integration/workplace-search/permissions_spec.rb +0 -77
@@ -25,33 +25,42 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
25
25
  delete_content_sources
26
26
  end
27
27
 
28
- let(:content_source_id) { client.create_content_source(name: 'my_content').body['id'] }
29
- let(:user) { 'elastic_user' }
30
- let(:source_user_id) { 'example@elastic.co' }
28
+ let(:content_source_id) { client.create_content_source(body: { name: 'my_content' }).body['id'] }
29
+ let(:external_user_id) { 'elastic_user' }
30
+ let(:user_properties) { ['attribute_name' => '_elasticsearch_username', 'attribute_value' => 'fernando'] }
31
31
  let(:body) do
32
- { user: user, source_user_id: source_user_id }
32
+ { external_user_id: external_user_id, permissions: [], external_user_properties: user_properties }
33
+ end
34
+ let(:expected_response) do
35
+ {
36
+ 'content_source_id' => content_source_id,
37
+ 'external_user_id' => external_user_id,
38
+ 'external_user_properties' => user_properties,
39
+ 'permissions' => []
40
+ }
33
41
  end
34
42
 
35
43
  context 'Creates' do
36
- let(:source_user_id) { 'test@elastic.co' }
44
+ # let(:source_user_id) { 'test@elastic.co' }
37
45
  let(:user) { 'test' }
38
46
 
39
47
  it 'creates an external identity' do
40
48
  response = client.create_external_identity(content_source_id, body: body)
41
49
 
42
50
  expect(response.status).to eq 200
43
- expect(response.body).to eq({ 'source_user_id' => source_user_id, 'user' => user })
51
+ expect(response.body).to eq(expected_response)
44
52
 
45
- client.delete_external_identity(content_source_id, user: user)
53
+ client.delete_external_identity(content_source_id, external_user_id: external_user_id)
46
54
  end
47
55
 
48
56
  it 'creates and retrieves' do
49
57
  client.create_external_identity(content_source_id, body: body)
50
- response = client.external_identity(content_source_id, user: user)
58
+ response = client.external_identity(content_source_id, external_user_id: external_user_id)
51
59
 
52
60
  expect(response.status).to eq 200
53
- expect(response.body).to eq({ 'source_user_id' => source_user_id, 'user' => user })
54
- client.delete_external_identity(content_source_id, user: user)
61
+
62
+ expect(response.body).to eq(expected_response)
63
+ client.delete_external_identity(content_source_id, external_user_id: external_user_id)
55
64
  end
56
65
  end
57
66
 
@@ -63,8 +72,9 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
63
72
  response = client.list_external_identities(content_source_id)
64
73
 
65
74
  expect(response.status).to eq 200
66
- expect(response.body['results']).to eq([{ 'source_user_id' => source_user_id, 'user' => user }])
67
- client.delete_external_identity(content_source_id, user: user)
75
+
76
+ expect(response.body['results']).to eq([expected_response])
77
+ client.delete_external_identity(content_source_id, external_user_id: external_user_id)
68
78
  end
69
79
  end
70
80
 
@@ -74,11 +84,11 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
74
84
  end
75
85
 
76
86
  it 'updates an external identity' do
77
- body = { source_user_id: 'example2@elastic.co' }
78
- response = client.put_external_identity(content_source_id, user: user, body: body)
87
+ body = { external_user_id: external_user_id, permissions: ['permission1'] }
88
+ response = client.put_external_identity(content_source_id, external_user_id: external_user_id, body: body)
79
89
 
80
90
  expect(response.status).to eq 200
81
- expect(response.body).to eq({ 'source_user_id' => 'example2@elastic.co', 'user' => user })
91
+ expect(response.body).to eq expected_response.merge({ 'permissions' => ['permission1'] })
82
92
  end
83
93
  end
84
94
 
@@ -88,7 +98,7 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
88
98
  end
89
99
 
90
100
  it 'deletes an external identity' do
91
- response = client.delete_external_identity(content_source_id, user: user)
101
+ response = client.delete_external_identity(content_source_id, external_user_id: external_user_id)
92
102
  expect(response.status).to eq 200
93
103
  expect(response.body).to eq 'ok'
94
104
  end
@@ -28,14 +28,14 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
28
28
  original_list = response.body['blocklist']
29
29
 
30
30
  # Add a term to the block list and check it's been changed
31
- response = client.put_triggers_blocklist(body: { blocklist: original_list + ['tests'] })
31
+ response = client.put_triggers_blocklist(blocklist: original_list + ['tests'])
32
32
  expect(response.status).to eq 200
33
33
  expect(response.body['blocklist']).to eq(original_list + ['tests'])
34
34
  response = client.triggers_blocklist
35
35
  expect(response.body['blocklist']).to eq(original_list + ['tests'])
36
36
 
37
37
  # Restored original list
38
- response = client.put_triggers_blocklist(body: { blocklist: original_list })
38
+ response = client.put_triggers_blocklist(blocklist: original_list)
39
39
  expect(response.status).to eq 200
40
40
  expect(response.body['blocklist']).to eq(original_list)
41
41
  end
@@ -26,11 +26,5 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
26
26
  expect(response.status).to eq 200
27
27
  expect(response.body.keys).to eq ['email', 'username']
28
28
  end
29
-
30
- it 'gets the current user with an access token' do
31
- response = client.current_user(get_token: true)
32
- expect(response.status).to eq 200
33
- expect(response.body.keys).to eq ['email', 'username', 'access_token']
34
- end
35
29
  end
36
30
  end
@@ -91,9 +91,46 @@ 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' do
95
- authorization_url = 'http://localhost:3002/ws/oauth/authorize?response_type=code&client_id=client_id&redirect_uri=https%3A%2F%2Flocalhost%3A3002'
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'
96
98
  expect(client.authorization_url('client_id', 'https://localhost:3002')).to eq authorization_url
97
99
  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
+ end
107
+
108
+ context 'adapters' do
109
+ let(:client) { described_class.new }
110
+ let(:adapter) { client.transport.transport.connections.all.first.connection.builder.adapter }
111
+
112
+ context 'when no adapter is specified' do
113
+ it 'uses Faraday NetHttp' do
114
+ expect(adapter).to eq Faraday::Adapter::NetHttp
115
+ end
116
+ end
117
+
118
+ context 'when the adapter is patron' do
119
+ let(:client) { described_class.new(adapter: :patron) }
120
+
121
+ it 'uses Faraday with the adapter' do
122
+ expect(adapter).to eq Faraday::Adapter::Patron
123
+ end
124
+ end
125
+
126
+ unless defined?(JRUBY_VERSION)
127
+ context 'when the adapter is typhoeus' do
128
+ let(:client) { described_class.new(adapter: :patron) }
129
+
130
+ it 'uses Faraday with the adapter' do
131
+ expect(adapter).to eq Faraday::Adapter::Patron
132
+ end
133
+ end
134
+ end
98
135
  end
99
136
  end
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: 7.17.0
4
+ version: 8.0.1
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-03-07 00:00:00.000000000 Z
11
+ date: 2022-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: elasticsearch-transport
14
+ name: elastic-transport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '7.11'
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: '7.11'
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.0.0
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.0.0
116
+ version: '1'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: vcr
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -164,7 +164,10 @@ 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.10.0.beta.1.yml"
167
+ - ".ci/jobs/elastic+enterprise-search-ruby+7.13.yml"
168
+ - ".ci/jobs/elastic+enterprise-search-ruby+7.14.yml"
169
+ - ".ci/jobs/elastic+enterprise-search-ruby+7.15.yml"
170
+ - ".ci/jobs/elastic+enterprise-search-ruby+7.16.yml"
168
171
  - ".ci/jobs/elastic+enterprise-search-ruby+main.yml"
169
172
  - ".ci/jobs/elastic+enterprise-search-ruby+pull-request.yml"
170
173
  - ".ci/make.sh"
@@ -175,17 +178,18 @@ files:
175
178
  - ".ci/run-tests"
176
179
  - ".ci/test-matrix.yml"
177
180
  - ".github/check_license_headers.rb"
178
- - ".github/compatibility/Gemfile"
179
181
  - ".github/license-header.txt"
180
- - ".github/workflows/compatibility.yml"
181
182
  - ".github/workflows/license.yml"
182
183
  - ".github/workflows/rubocop.yml"
183
184
  - ".github/workflows/testing.yml"
184
185
  - ".gitignore"
185
186
  - ".rubocop.yml"
187
+ - CHANGELOG
188
+ - CODE_OF_CONDUCT
186
189
  - CONTRIBUTING.md
187
190
  - Gemfile
188
191
  - LICENSE
192
+ - NOTICE
189
193
  - README.md
190
194
  - Rakefile
191
195
  - docs/guide/app-search-api.asciidoc
@@ -203,12 +207,16 @@ files:
203
207
  - docs/guide/release_notes/715.asciidoc
204
208
  - docs/guide/release_notes/716.asciidoc
205
209
  - docs/guide/release_notes/717.asciidoc
210
+ - docs/guide/release_notes/80.asciidoc
206
211
  - docs/guide/release_notes/index.asciidoc
207
212
  - docs/guide/workplace-search-api.asciidoc
208
213
  - elastic-enterprise-search.gemspec
209
214
  - lib/data/ca-bundle.crt
210
215
  - lib/elastic-enterprise-search.rb
211
216
  - lib/elastic/.rubocop.yml
217
+ - lib/elastic/api/response.rb
218
+ - lib/elastic/app-search/api/adaptive_relevance_settings.rb
219
+ - lib/elastic/app-search/api/adaptive_relevance_suggestions.rb
212
220
  - lib/elastic/app-search/api/add_meta_engine_source.rb
213
221
  - lib/elastic/app-search/api/api_key.rb
214
222
  - lib/elastic/app-search/api/api_logs.rb
@@ -254,8 +262,10 @@ files:
254
262
  - lib/elastic/app-search/api/documents.rb
255
263
  - lib/elastic/app-search/api/engine.rb
256
264
  - lib/elastic/app-search/api/index_documents.rb
265
+ - lib/elastic/app-search/api/list_adaptive_relevance_suggestions.rb
257
266
  - lib/elastic/app-search/api/list_api_keys.rb
258
267
  - lib/elastic/app-search/api/list_crawler_crawl_requests.rb
268
+ - lib/elastic/app-search/api/list_crawler_domains.rb
259
269
  - lib/elastic/app-search/api/list_crawler_process_crawls.rb
260
270
  - lib/elastic/app-search/api/list_curations.rb
261
271
  - lib/elastic/app-search/api/list_documents.rb
@@ -263,6 +273,8 @@ files:
263
273
  - lib/elastic/app-search/api/list_synonym_sets.rb
264
274
  - lib/elastic/app-search/api/log_clickthrough.rb
265
275
  - lib/elastic/app-search/api/multi_search.rb
276
+ - lib/elastic/app-search/api/put_adaptive_relevance_settings.rb
277
+ - lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb
266
278
  - lib/elastic/app-search/api/put_api_key.rb
267
279
  - lib/elastic/app-search/api/put_crawler_crawl_rule.rb
268
280
  - lib/elastic/app-search/api/put_crawler_crawl_schedule.rb
@@ -275,6 +287,7 @@ files:
275
287
  - lib/elastic/app-search/api/put_search_settings.rb
276
288
  - lib/elastic/app-search/api/put_synonym_set.rb
277
289
  - lib/elastic/app-search/api/query_suggestion.rb
290
+ - lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb
278
291
  - lib/elastic/app-search/api/reset_search_settings.rb
279
292
  - lib/elastic/app-search/api/schema.rb
280
293
  - lib/elastic/app-search/api/search.rb
@@ -295,7 +308,6 @@ files:
295
308
  - lib/elastic/enterprise-search/utils.rb
296
309
  - lib/elastic/enterprise-search/version.rb
297
310
  - lib/elastic/enterprise_search.rb
298
- - lib/elastic/workplace-search/api/add_user_permissions.rb
299
311
  - lib/elastic/workplace-search/api/auto_query_refinement_details.rb
300
312
  - lib/elastic/workplace-search/api/command_sync_jobs.rb
301
313
  - lib/elastic/workplace-search/api/content_source.rb
@@ -316,19 +328,15 @@ files:
316
328
  - lib/elastic/workplace-search/api/list_content_sources.rb
317
329
  - lib/elastic/workplace-search/api/list_documents.rb
318
330
  - lib/elastic/workplace-search/api/list_external_identities.rb
319
- - lib/elastic/workplace-search/api/list_permissions.rb
320
331
  - lib/elastic/workplace-search/api/list_synonym_sets.rb
321
332
  - lib/elastic/workplace-search/api/put_content_source.rb
322
333
  - lib/elastic/workplace-search/api/put_content_source_icons.rb
323
334
  - lib/elastic/workplace-search/api/put_external_identity.rb
324
335
  - lib/elastic/workplace-search/api/put_synonym_set.rb
325
336
  - 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
337
  - lib/elastic/workplace-search/api/search.rb
329
338
  - lib/elastic/workplace-search/api/synonym_set.rb
330
339
  - lib/elastic/workplace-search/api/triggers_blocklist.rb
331
- - lib/elastic/workplace-search/api/user_permissions.rb
332
340
  - lib/elastic/workplace-search/workplace_search.rb
333
341
  - rake_tasks/unified_release_tasks.rake
334
342
  - spec/app-search/client_spec.rb
@@ -339,6 +347,8 @@ files:
339
347
  - spec/fixtures/vcr/workplace_search/create_analytics_event.yml
340
348
  - spec/fixtures/vcr/workplace_search/oauth_request_token.yml
341
349
  - spec/fixtures/vcr/workplace_search/search_request.yml
350
+ - spec/integration/app-search/adaptive_relevance_settings_spec.rb
351
+ - spec/integration/app-search/adaptive_relevance_suggestions_spec.rb
342
352
  - spec/integration/app-search/api_key_spec.rb
343
353
  - spec/integration/app-search/api_logs_spec.rb
344
354
  - spec/integration/app-search/app_search_helper.rb
@@ -372,7 +382,6 @@ files:
372
382
  - spec/integration/workplace-search/documents_spec.rb
373
383
  - spec/integration/workplace-search/external_identities_spec.rb
374
384
  - spec/integration/workplace-search/icon.png
375
- - spec/integration/workplace-search/permissions_spec.rb
376
385
  - spec/integration/workplace-search/synonym_sets_spec.rb
377
386
  - spec/integration/workplace-search/triggers_spec.rb
378
387
  - spec/integration/workplace-search/users_spec.rb
@@ -399,14 +408,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
399
408
  requirements:
400
409
  - - ">="
401
410
  - !ruby/object:Gem::Version
402
- version: '2.5'
411
+ version: '2.6'
403
412
  required_rubygems_version: !ruby/object:Gem::Requirement
404
413
  requirements:
405
414
  - - ">="
406
415
  - !ruby/object:Gem::Version
407
416
  version: '0'
408
417
  requirements: []
409
- rubygems_version: 3.3.3
418
+ rubygems_version: 3.3.7
410
419
  signing_key:
411
420
  specification_version: 4
412
421
  summary: Official API client for Elastic Enterprise Search
@@ -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