elastic-enterprise-search 7.14.0 → 7.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +4 -4
  2. data/.ci/functions/imports.sh +1 -0
  3. data/.ci/jobs/defaults.yml +4 -0
  4. data/.ci/jobs/{elastic+enterprise-search-ruby+master.yml → elastic+enterprise-search-ruby+main.yml} +4 -4
  5. data/.ci/run-repository.sh +2 -1
  6. data/.ci/test-matrix.yml +5 -3
  7. data/{spec/app-search/api_spec_helper.rb → .github/compatibility/Gemfile} +4 -11
  8. data/.github/workflows/compatibility.yml +20 -0
  9. data/.github/workflows/testing.yml +1 -1
  10. data/CONTRIBUTING.md +1 -1
  11. data/README.md +1 -1
  12. data/Rakefile +19 -0
  13. data/docs/guide/app-search-api.asciidoc +155 -1
  14. data/docs/guide/overview.asciidoc +3 -3
  15. data/docs/guide/release_notes/714.asciidoc +12 -0
  16. data/docs/guide/release_notes/715.asciidoc +48 -0
  17. data/docs/guide/release_notes/716.asciidoc +16 -0
  18. data/docs/guide/release_notes/index.asciidoc +4 -0
  19. data/docs/guide/workplace-search-api.asciidoc +17 -0
  20. data/elastic-enterprise-search.gemspec +1 -1
  21. data/lib/elastic/app-search/api/adaptive_relevance_settings.rb +51 -0
  22. data/lib/elastic/app-search/api/adaptive_relevance_suggestions.rb +56 -0
  23. data/lib/elastic/app-search/api/add_meta_engine_source.rb +3 -2
  24. data/lib/elastic/app-search/api/api_key.rb +2 -1
  25. data/lib/elastic/app-search/api/api_logs.rb +14 -13
  26. data/lib/elastic/app-search/api/count_analytics.rb +7 -6
  27. data/lib/elastic/app-search/api/crawler_active_crawl_request.rb +51 -0
  28. data/lib/elastic/app-search/api/crawler_crawl_request.rb +54 -0
  29. data/lib/elastic/app-search/api/crawler_crawl_schedule.rb +51 -0
  30. data/lib/elastic/app-search/api/crawler_domain.rb +54 -0
  31. data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +48 -0
  32. data/lib/elastic/app-search/api/crawler_metrics.rb +48 -0
  33. data/lib/elastic/app-search/api/crawler_overview.rb +51 -0
  34. data/lib/elastic/app-search/api/crawler_process_crawl.rb +54 -0
  35. data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +54 -0
  36. data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +52 -0
  37. data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +51 -0
  38. data/lib/elastic/app-search/api/crawler_url_validation_result.rb +51 -0
  39. data/lib/elastic/app-search/api/crawler_user_agent.rb +48 -0
  40. data/lib/elastic/app-search/api/create_api_key.rb +9 -1
  41. data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +51 -0
  42. data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +60 -0
  43. data/lib/elastic/app-search/api/create_crawler_domain.rb +55 -0
  44. data/lib/elastic/app-search/api/create_crawler_entry_point.rb +57 -0
  45. data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +53 -0
  46. data/lib/elastic/app-search/api/create_crawler_sitemap.rb +57 -0
  47. data/lib/elastic/app-search/api/create_curation.rb +8 -6
  48. data/lib/elastic/app-search/api/create_engine.rb +9 -7
  49. data/lib/elastic/app-search/api/create_synonym_set.rb +7 -4
  50. data/lib/elastic/app-search/api/curation.rb +4 -3
  51. data/lib/elastic/app-search/api/delete_active_crawl_request.rb +51 -0
  52. data/lib/elastic/app-search/api/delete_api_key.rb +1 -0
  53. data/lib/elastic/app-search/api/delete_crawler_active_crawl_request.rb +51 -0
  54. data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +57 -0
  55. data/lib/elastic/app-search/api/delete_crawler_crawl_schedule.rb +51 -0
  56. data/lib/elastic/app-search/api/delete_crawler_domain.rb +54 -0
  57. data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +57 -0
  58. data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +57 -0
  59. data/lib/elastic/app-search/api/delete_curation.rb +4 -3
  60. data/lib/elastic/app-search/api/delete_documents.rb +2 -1
  61. data/lib/elastic/app-search/api/delete_engine.rb +3 -2
  62. data/lib/elastic/app-search/api/delete_meta_engine_source.rb +3 -3
  63. data/lib/elastic/app-search/api/delete_synonym_set.rb +4 -3
  64. data/lib/elastic/app-search/api/denied_urls.rb +54 -0
  65. data/lib/elastic/app-search/api/documents.rb +3 -2
  66. data/lib/elastic/app-search/api/engine.rb +3 -2
  67. data/lib/elastic/app-search/api/index_documents.rb +3 -2
  68. data/lib/elastic/app-search/api/list_adaptive_relevance_suggestions.rb +53 -0
  69. data/lib/elastic/app-search/api/list_api_keys.rb +2 -1
  70. data/lib/elastic/app-search/api/list_crawler_crawl_requests.rb +52 -0
  71. data/lib/elastic/app-search/api/list_crawler_domains.rb +51 -0
  72. data/lib/elastic/app-search/api/list_crawler_process_crawls.rb +51 -0
  73. data/lib/elastic/app-search/api/list_curations.rb +3 -2
  74. data/lib/elastic/app-search/api/list_documents.rb +3 -2
  75. data/lib/elastic/app-search/api/list_engines.rb +2 -1
  76. data/lib/elastic/app-search/api/list_synonym_sets.rb +3 -2
  77. data/lib/elastic/app-search/api/log_clickthrough.rb +8 -10
  78. data/lib/elastic/app-search/api/put_adaptive_relevance_settings.rb +52 -0
  79. data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +51 -0
  80. data/lib/elastic/app-search/api/put_api_key.rb +9 -2
  81. data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +63 -0
  82. data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +53 -0
  83. data/lib/elastic/app-search/api/put_crawler_domain.rb +58 -0
  84. data/lib/elastic/app-search/api/put_crawler_entry_point.rb +60 -0
  85. data/lib/elastic/app-search/api/put_crawler_sitemap.rb +60 -0
  86. data/lib/elastic/app-search/api/put_curation.rb +10 -8
  87. data/lib/elastic/app-search/api/put_documents.rb +3 -3
  88. data/lib/elastic/app-search/api/put_schema.rb +4 -4
  89. data/lib/elastic/app-search/api/put_search_settings.rb +6 -2
  90. data/lib/elastic/app-search/api/put_synonym_set.rb +8 -5
  91. data/lib/elastic/app-search/api/query_suggestion.rb +7 -7
  92. data/lib/elastic/app-search/api/reset_search_settings.rb +3 -2
  93. data/lib/elastic/app-search/api/schema.rb +3 -2
  94. data/lib/elastic/app-search/api/search.rb +14 -3
  95. data/lib/elastic/app-search/api/search_settings.rb +3 -2
  96. data/lib/elastic/app-search/api/synonym_set.rb +4 -3
  97. data/lib/elastic/app-search/api/top_clicks_analytics.rb +8 -8
  98. data/lib/elastic/app-search/api/top_queries_analytics.rb +7 -7
  99. data/lib/elastic/app-search/app_search.rb +0 -10
  100. data/lib/elastic/enterprise-search/api/health.rb +1 -0
  101. data/lib/elastic/enterprise-search/api/put_read_only.rb +3 -2
  102. data/lib/elastic/enterprise-search/api/read_only.rb +1 -0
  103. data/lib/elastic/enterprise-search/api/version.rb +1 -0
  104. data/lib/elastic/enterprise-search/client.rb +12 -1
  105. data/lib/elastic/enterprise-search/request.rb +10 -1
  106. data/lib/elastic/enterprise-search/version.rb +1 -1
  107. data/lib/elastic/workplace-search/api/auto_query_refinement_details.rb +49 -0
  108. data/lib/elastic/workplace-search/api/create_content_source.rb +1 -0
  109. data/lib/elastic/workplace-search/api/delete_synonym_set.rb +1 -1
  110. data/lib/elastic/workplace-search/api/list_documents.rb +55 -0
  111. data/lib/elastic/workplace-search/api/put_content_source.rb +1 -0
  112. data/lib/elastic/workplace-search/api/put_synonym_set.rb +1 -1
  113. data/lib/elastic/workplace-search/api/put_triggers_blocklist.rb +47 -0
  114. data/lib/elastic/workplace-search/api/search.rb +3 -0
  115. data/lib/elastic/workplace-search/api/synonym_set.rb +1 -1
  116. data/{spec/app-search/api_logs_spec.rb → lib/elastic/workplace-search/api/triggers_blocklist.rb} +23 -14
  117. data/lib/elastic/workplace-search/workplace_search.rb +0 -15
  118. data/spec/integration/app-search/adaptive_relevance_spec.rb +80 -0
  119. data/spec/integration/app-search/api_key_spec.rb +110 -0
  120. data/spec/integration/app-search/api_logs_spec.rb +59 -0
  121. data/spec/integration/app-search/app_search_helper.rb +51 -0
  122. data/spec/integration/app-search/count_analytics_spec.rb +47 -0
  123. data/spec/integration/app-search/crawl_requests_spec.rb +86 -0
  124. data/spec/integration/app-search/crawler_crawl_rule_spec.rb +73 -0
  125. data/spec/integration/app-search/crawler_domain_spec.rb +87 -0
  126. data/spec/integration/app-search/crawler_entry_point_spec.rb +77 -0
  127. data/spec/integration/app-search/crawler_metrics_spec.rb +46 -0
  128. data/spec/integration/app-search/crawler_overview_spec.rb +45 -0
  129. data/spec/integration/app-search/crawler_process_crawl_denied_urls_spec.rb +50 -0
  130. data/spec/integration/app-search/crawler_process_crawl_spec.rb +66 -0
  131. data/spec/integration/app-search/crawler_scheduling_spec.rb +69 -0
  132. data/spec/integration/app-search/crawler_sitemap_spec.rb +72 -0
  133. data/spec/integration/app-search/crawler_urls_spec.rb +60 -0
  134. data/spec/{app-search/api_count_analytics_spec.rb → integration/app-search/crawler_user_agent_spec.rb} +6 -9
  135. data/spec/integration/app-search/curations_spec.rb +118 -0
  136. data/spec/integration/app-search/documents_spec.rb +123 -0
  137. data/spec/integration/app-search/engines_spec.rb +78 -0
  138. data/spec/{app-search/api_log_clickthrough_spec.rb → integration/app-search/log_clickthrough_spec.rb} +14 -7
  139. data/spec/integration/app-search/meta_engines_spec.rb +75 -0
  140. data/spec/integration/app-search/query_suggestion_spec.rb +50 -0
  141. data/spec/{app-search/api_schema_spec.rb → integration/app-search/schema_spec.rb} +21 -16
  142. data/spec/integration/app-search/search_and_multiple_search_spec.rb +67 -0
  143. data/spec/integration/app-search/search_settings_spec.rb +87 -0
  144. data/spec/integration/app-search/synonyms_spec.rb +79 -0
  145. data/spec/{app-search/api_top_clicks_analytics_spec.rb → integration/app-search/top_clicks_analytics_spec.rb} +20 -14
  146. data/spec/{app-search/api_top_queries_analytics_spec.rb → integration/app-search/top_queries_analytics_spec.rb} +16 -8
  147. data/spec/integration/workplace-search/content_sources_spec.rb +106 -0
  148. data/spec/integration/workplace-search/documents_spec.rb +102 -0
  149. data/spec/integration/workplace-search/external_identities_spec.rb +97 -0
  150. data/spec/integration/{icon.png → workplace-search/icon.png} +0 -0
  151. data/spec/integration/workplace-search/permissions_spec.rb +77 -0
  152. data/spec/integration/workplace-search/synonym_sets_spec.rb +92 -0
  153. data/spec/integration/workplace-search/triggers_spec.rb +43 -0
  154. data/spec/{app-search/api_query_suggestion_spec.rb → integration/workplace-search/users_spec.rb} +12 -15
  155. data/spec/integration/workplace-search/workplace_search_helper.rb +39 -0
  156. metadata +94 -68
  157. data/spec/app-search/api_apikey_spec.rb +0 -92
  158. data/spec/app-search/api_curations_spec.rb +0 -97
  159. data/spec/app-search/api_documents_spec.rb +0 -102
  160. data/spec/app-search/api_engines_spec.rb +0 -67
  161. data/spec/app-search/api_meta_engines_spec.rb +0 -72
  162. data/spec/app-search/api_search_and_multi_search_spec.rb +0 -48
  163. data/spec/app-search/api_search_settings_spec.rb +0 -76
  164. data/spec/app-search/api_synonyms_spec.rb +0 -79
  165. data/spec/fixtures/vcr/app_search/add_meta_engine_source.yml +0 -109
  166. data/spec/fixtures/vcr/app_search/api_documents.yml +0 -56
  167. data/spec/fixtures/vcr/app_search/api_index_documents.yml +0 -57
  168. data/spec/fixtures/vcr/app_search/api_log_clickthrough.yml +0 -54
  169. data/spec/fixtures/vcr/app_search/api_logs.yml +0 -70
  170. data/spec/fixtures/vcr/app_search/api_put_schema.yml +0 -109
  171. data/spec/fixtures/vcr/app_search/api_put_search_settings.yml +0 -56
  172. data/spec/fixtures/vcr/app_search/api_query_suggestion.yml +0 -59
  173. data/spec/fixtures/vcr/app_search/api_reset_search_settings.yml +0 -56
  174. data/spec/fixtures/vcr/app_search/api_schema.yml +0 -56
  175. data/spec/fixtures/vcr/app_search/api_search_settings.yml +0 -56
  176. data/spec/fixtures/vcr/app_search/api_top_clicks_analytics.yml +0 -55
  177. data/spec/fixtures/vcr/app_search/api_top_clicks_analytics_query.yml +0 -55
  178. data/spec/fixtures/vcr/app_search/api_top_queries_analytics.yml +0 -55
  179. data/spec/fixtures/vcr/app_search/count_analytics.yml +0 -55
  180. data/spec/fixtures/vcr/app_search/create_and_update_document.yml +0 -107
  181. data/spec/fixtures/vcr/app_search/create_api_key.yml +0 -52
  182. data/spec/fixtures/vcr/app_search/create_curation.yml +0 -113
  183. data/spec/fixtures/vcr/app_search/create_engine.yml +0 -55
  184. data/spec/fixtures/vcr/app_search/create_meta_engine.yml +0 -56
  185. data/spec/fixtures/vcr/app_search/create_synonym_set.yml +0 -56
  186. data/spec/fixtures/vcr/app_search/delete_api_key.yml +0 -52
  187. data/spec/fixtures/vcr/app_search/delete_curation.yml +0 -56
  188. data/spec/fixtures/vcr/app_search/delete_engine.yml +0 -55
  189. data/spec/fixtures/vcr/app_search/delete_meta_engine_source.yml +0 -56
  190. data/spec/fixtures/vcr/app_search/delete_synonym_set.yml +0 -56
  191. data/spec/fixtures/vcr/app_search/get_api_key.yml +0 -52
  192. data/spec/fixtures/vcr/app_search/get_curation.yml +0 -56
  193. data/spec/fixtures/vcr/app_search/get_engine.yml +0 -55
  194. data/spec/fixtures/vcr/app_search/index_and_delete_document.yml +0 -107
  195. data/spec/fixtures/vcr/app_search/list_api_keys.yml +0 -52
  196. data/spec/fixtures/vcr/app_search/list_curations.yml +0 -56
  197. data/spec/fixtures/vcr/app_search/list_documents.yml +0 -57
  198. data/spec/fixtures/vcr/app_search/list_engines.yml +0 -55
  199. data/spec/fixtures/vcr/app_search/list_synonym_sets.yml +0 -56
  200. data/spec/fixtures/vcr/app_search/multi_query_search.yml +0 -63
  201. data/spec/fixtures/vcr/app_search/put_api_key.yml +0 -52
  202. data/spec/fixtures/vcr/app_search/put_curation.yml +0 -113
  203. data/spec/fixtures/vcr/app_search/put_synonym_set.yml +0 -56
  204. data/spec/fixtures/vcr/app_search/search.yml +0 -57
  205. data/spec/fixtures/vcr/app_search/single_query_search.yml +0 -60
  206. data/spec/fixtures/vcr/app_search/synonym_set.yml +0 -56
  207. data/spec/integration/workplace_search_spec.rb +0 -375
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1eef7550b4a936e514eb9b0eb52272a2b445b3e54c301c7cec29039c789561ee
4
- data.tar.gz: 47ab2fcbb9b00a3cbb219e713ee9308642345b72dcc6af5b9f0f1f334edd7c09
3
+ metadata.gz: e3331736a101d1b938e0911742b67fe42a42849e179e8f5b575f9f2b07dafda2
4
+ data.tar.gz: 3ef839006353cd13259ec36ddf0244c2c6812f19add3a04b48dd169e2d66238c
5
5
  SHA512:
6
- metadata.gz: 38a4519bfa5d4b3ea04507468b0c5ddb7122d8c5c928943b45d3d1ce120d3a1652ac7c2aff217082aaca4cdc3124b732e4f31c265bf5c6f0cdc0173672e020f0
7
- data.tar.gz: 7cd26fe0a7fc874ccbcfb16ef443d5c9ddd69b0a882690dcbfc0b90d698a10bd89d942530ba93aae78531cddc6960721edd8d2a410728be87aacd018e1aeed31
6
+ metadata.gz: 5f1d529bdbd13f0c550bee3f475ee799ec537e39ffc172b18119a194fe61c27a8452c56e1cd1ee8cb68a6d60fb56da92bc4cadad82d35650119df7ef21647e09
7
+ data.tar.gz: 36465dbde68f27f1d39a7afb829e890e6ccda5c6b4fce70186ecc229ada201de89a13fbbd198d2c6a5b483ac4e4e5c28abd516633d5a45c7b241bc2ecc92d6ff
@@ -19,6 +19,7 @@ if [[ -z $es_node_name ]]; then
19
19
  # only set these once
20
20
  set -euo pipefail
21
21
  export TEST_SUITE=${TEST_SUITE-free}
22
+ export SERVICE=${SERVICE-}
22
23
  export RUNSCRIPTS=${RUNSCRIPTS-}
23
24
  export DETACH=${DETACH-false}
24
25
  export CLEANUP=${CLEANUP-false}
@@ -46,6 +46,10 @@
46
46
  type: yaml
47
47
  filename: .ci/test-matrix.yml
48
48
  name: RUBY_VERSION
49
+ - axis:
50
+ type: yaml
51
+ filename: .ci/test-matrix.yml
52
+ name: SERVICE
49
53
  yaml-strategy:
50
54
  exclude-key: exclude
51
55
  filename: .ci/test-matrix.yml
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  - job:
3
- name: elastic+enterprise-search-ruby+master
4
- display-name: 'elastic / enterprise-search-ruby # master'
5
- description: Testing the enterprise-search-ruby master branch.
3
+ name: elastic+enterprise-search-ruby+main
4
+ display-name: 'elastic / enterprise-search-ruby # main'
5
+ description: Testing the enterprise-search-ruby main branch.
6
6
  junit_results: "*-junit.xml"
7
7
  parameters:
8
8
  - string:
9
9
  name: branch_specifier
10
- default: refs/heads/master
10
+ default: refs/heads/main
11
11
  description: the Git branch specifier to build (<branchName>, <tagName>,
12
12
  <commitId>, etc.)
@@ -17,6 +17,7 @@ echo -e "\033[34;1mINFO:\033[0m TEST_SUITE: ${TEST_SUITE}\033[0m"
17
17
  echo -e "\033[34;1mINFO:\033[0m RUBY_VERSION: ${RUBY_VERSION}\033[0m"
18
18
  echo -e "\033[34;1mINFO:\033[0m RUNSCRIPTS: ${RUNSCRIPTS}\033[0m"
19
19
  echo -e "\033[34;1mINFO:\033[0m URL: ${elasticsearch_url}\033[0m"
20
+ echo -e "\033[34;1mINFO:\033[0m SERVICE: ${SERVICE}\033[0m"
20
21
 
21
22
  echo -e "\033[34;1mINFO:\033[0m pinging Elasticsearch ..\033[0m"
22
23
  curl --insecure --fail $external_elasticsearch_url/_cluster/health?pretty
@@ -46,4 +47,4 @@ docker run \
46
47
  --rm \
47
48
  --volume `pwd`:/code/enterprise-search-ruby \
48
49
  elastic/enterprise-search-ruby \
49
- rake spec:integration
50
+ rake spec:integration:${SERVICE}
data/.ci/test-matrix.yml CHANGED
@@ -6,9 +6,11 @@ RUBY_VERSION:
6
6
  - 2.5
7
7
 
8
8
  STACK_VERSION:
9
- - 7.14-SNAPSHOT
9
+ - 7.16-SNAPSHOT
10
10
 
11
- TEST_SUITE:
12
- - platinum
11
+ SERVICE:
12
+ - appsearch
13
+ - enterprisesearch
14
+ - workplacesearch
13
15
 
14
16
  exclude: ~
@@ -14,17 +14,10 @@
14
14
  # KIND, either express or implied. See the License for the
15
15
  # specific language governing permissions and limitations
16
16
  # under the License.
17
+
17
18
  # frozen_string_literal: true
18
19
 
19
- require 'spec_helper'
20
+ source 'https://rubygems.org'
20
21
 
21
- RSpec.configure do |config|
22
- config.before(:example) do
23
- @host = ENV['ELASTIC_ENTERPRISE_HOST'] || 'http://localhost:3002'
24
- @api_key = ENV['ELASTIC_APPSEARCH_API_KEY'] || 'api_key'
25
- @client = Elastic::EnterpriseSearch::AppSearch::Client.new(
26
- host: @host,
27
- http_auth: @api_key
28
- )
29
- end
30
- end
22
+ gem 'elasticsearch', ENV['es-version']
23
+ gem 'elastic-enterprise-search', path: File.expand_path('../../', __dir__)
@@ -0,0 +1,20 @@
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 ]
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 3.0
17
+ - name: Build Gemfile with Elasticsearch gem
18
+ run: |
19
+ ruby -v
20
+ cd ./.github/compatibility/ && bundle
@@ -1,4 +1,4 @@
1
- name: 7.14
1
+ name: 7.x
2
2
  on: [push, pull_request]
3
3
 
4
4
  jobs:
data/CONTRIBUTING.md CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  3. Rebase your changes. Update your local repository with the most recent code
24
24
  from the main `enterprise-search-ruby` repository and rebase your branch
25
- on top of the latest `master` branch. All of your changes will be squashed
25
+ on top of the latest `main` branch. All of your changes will be squashed
26
26
  into a single commit so don't worry about pushing multiple times.
27
27
 
28
28
  4. Submit a pull request. Push your local changes to your forked repository
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Elastic Enterprise Search Client
2
2
 
3
- ![build](https://github.com/elastic/enterprise-search-ruby/workflows/master/badge.svg)
3
+ ![build](https://github.com/elastic/enterprise-search-ruby/workflows/main/badge.svg)
4
4
  ![rubocop](https://github.com/elastic/enterprise-search-ruby/workflows/rubocop/badge.svg)
5
5
  [![Ruby Style Guide](https://img.shields.io/badge/code_style-rubocop-brightgreen.svg)](https://github.com/rubocop-hq/rubocop)
6
6
 
data/Rakefile CHANGED
@@ -31,6 +31,7 @@ task :stack, [:version] do |_, params|
31
31
  sh "STACK_VERSION=#{params[:version]} ./.ci/run-local.sh"
32
32
  end
33
33
 
34
+ # rubocop:disable Metrics/BlockLength
34
35
  namespace :spec do
35
36
  desc 'Run client tests'
36
37
  task :client do
@@ -46,4 +47,22 @@ namespace :spec do
46
47
  task :all do
47
48
  sh 'rspec spec'
48
49
  end
50
+
51
+ namespace :integration do
52
+ desc 'Run App Search integration tests'
53
+ task :appsearch do
54
+ sh 'rspec spec/integration/app-search'
55
+ end
56
+
57
+ desc 'Run Enterprise Search integration tests'
58
+ task :enterprisesearch do
59
+ sh 'rspec spec/integration/enterprise_search_api_spec.rb'
60
+ end
61
+
62
+ desc 'Run Workplace Search integration tests'
63
+ task :workplacesearch do
64
+ sh 'rspec spec/integration/workplace-search'
65
+ end
66
+ end
49
67
  end
68
+ # rubocop:enable Metrics/BlockLength
@@ -1,6 +1,8 @@
1
1
  [[app-search-api]]
2
2
  == App Search API
3
3
 
4
+ This document includes examples for different API requests. Please refer to the https://www.elastic.co/guide/en/app-search/current/index.html[Elastic App Search Documentation] for more information, particularly the https://www.elastic.co/guide/en/app-search/current/api-reference.html[API Reference].
5
+
4
6
  === Engines
5
7
 
6
8
  [source,rb]
@@ -174,6 +176,158 @@ client.put_api_key(api_key_name: name, body: body)
174
176
  client.delete_api_key(api_key_name: name)
175
177
  ----------------------------
176
178
 
179
+ === Web Crawler
180
+
181
+ [CAUTION]
182
+ ====
183
+ The Elastic Enterprise Search web crawler API is a *beta* feature.
184
+ Beta features are subject to change and are not covered by the support SLA of general release (GA) features.
185
+ Elastic plans to promote this feature to GA in a future release.
186
+ ====
187
+
188
+ See https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html[Web Crawler API reference] for more information.
189
+
190
+ [source,rb]
191
+ ----------------------------
192
+ # Create a crawler domain
193
+ body = { name: 'https://www.elastic.co' }
194
+ client.create_crawler_domain(engine_name, body: body)
195
+
196
+ # Get crawler domain information
197
+ client.crawler_domain(engine_name, domain_id: domain_id)
198
+
199
+ # List crawler domains
200
+ client.list_crawler_domains(engine_name)
201
+
202
+ # Update a crawler domain
203
+ body = { name: 'https://www.wikipedia.org' }
204
+ client.put_crawler_domain(engine_name, domain_id: domain_id, domain: body)
205
+
206
+ # Delete a crawler domain
207
+ client.delete_crawler_domain(engine_name, domain_id: domain_id)
208
+
209
+ # Create a crawler crawl request
210
+ client.create_crawler_crawl_request(engine_name)
211
+
212
+ # Retrieve a crawl request
213
+ client.crawler_crawl_request(engine_name, crawl_request_id: request_id)
214
+
215
+ # Retrieve active crawl request details
216
+ client.crawler_active_crawl_request(engine_name)
217
+
218
+ # List crawl requests
219
+ client.list_crawler_crawl_requests(engine_name)
220
+
221
+ # Delete an active crawl request
222
+ client.delete_active_crawl_request(engine_name)
223
+
224
+ # Set a crawler crawl schedule
225
+ body = { frequency: 1, unit: 'day' }
226
+ client.put_crawler_crawl_schedule(engine_name, body: body)
227
+
228
+ # Retrieve crawler crawl schedule
229
+ client.crawler_crawl_schedule(engine_name)
230
+
231
+ # Delete a crawler crawl schedule
232
+ client.delete_crawler_crawl_schedule(engine_name)
233
+
234
+ # Create a crawler entry point
235
+ client.create_crawler_entry_point(engine_name, domain_id: domain_id, body: { value: '/elastic-stack' })
236
+
237
+ # Update a crawler entry point
238
+ client.put_crawler_entry_point(
239
+ engine_name,
240
+ domain_id: domain_id,
241
+ entry_point_id: entry_point_id,
242
+ body: { value: '/enterprise-search' }
243
+ )
244
+
245
+ # Validate a URL
246
+ client.crawler_url_validation_result(engine_name, url: name)
247
+
248
+ # Extract ccontent from a URL
249
+ client.crawler_url_extraction_result(engine_name, url: name)
250
+
251
+ # Retrieve tracing history for a crawler URL
252
+ client.crawler_url_tracing_result(engine_name, url: name)
253
+
254
+ # Delete a crawler entry point
255
+ client.delete_crawler_entry_point(
256
+ engine_name,
257
+ domain_id: domain_id,
258
+ entry_point_id: entry_point_id
259
+ )
260
+
261
+ # Retrieve crawler metrics
262
+ client.crawler_metrics
263
+
264
+ # Retrieve crawler configuration overview
265
+ client.crawler_overview(engine_name)
266
+
267
+ # Create a crawler sitemap
268
+ body = { url: 'https://www.elastic.co/sitemap.xml' }
269
+ client.create_crawler_sitemap(engine_name, domain_id: domain_id, body: body)
270
+
271
+ # Update a crawler sitemap
272
+ body = { url: 'https://www.elastic.co/sitemap2.xml' }
273
+ client.put_crawler_sitemap(engine_name, domain_id: domain_id, sitemap_id: sitemap_id, body: body)
274
+
275
+ # Delete a crawler sitemap
276
+ client.delete_crawler_sitemap(engine_name, domain_id: domain_id, sitemap_id: sitemap_id)
277
+
278
+ # Create a crawler crawl rule
279
+ body = { order: 1, policy: 'allow', rule: 'contains', pattern: '/stack' }
280
+ client.create_crawler_crawl_rule(engine_name, domain_id: domain_id, body: body)
281
+
282
+ # Update a crawler crawl rule
283
+ body = { order: 2, policy: 'allow', rule: 'begins', pattern: '/stack' }
284
+ client.put_crawler_crawl_rule(engine_name, domain_id: domain_id, crawl_rule_id: rule_id, body: body)
285
+
286
+ # Delete a crawler crawl rule
287
+ client.delete_crawler_crawl_rule(engine_name, domain_id: domain_id, crawl_rule_id: rule_id)
288
+
289
+ # Create a process crawl
290
+ client.create_crawler_process_crawl(engine_name, body: { dry_run: true })
291
+
292
+ # Retrieve a process crawl
293
+ client.crawler_process_crawl(engine_name, process_crawl_id: id)
294
+
295
+ # Retrieve denied URLs cor a process crawl
296
+ client.denied_urls(engine_name, process_crawl_id: id)
297
+
298
+ # List process crawls
299
+ client.list_crawler_process_crawls(engine_name)
300
+
301
+ # View denied urls for Process Crawl
302
+ client.crawler_process_crawl_denied_urls(engine_name, process_crawl_id: id)
303
+
304
+ # Cancel an active crawl request, stopping a running crawl if needed.
305
+ client.delete_crawler_active_crawl_request(engine_name)
306
+ ----------------------------
307
+ === Adaptive Relevance
308
+
309
+
310
+ The adaptive relevance API is a **beta** feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release. The adaptive relevance API is not available at all Elastic subscription levels. Refer to the Elastic subscriptions pages for https://www.elastic.co/subscriptions/cloud[Elastic Cloud] and https://www.elastic.co/subscriptions[self-managed] deployments.
311
+
312
+ [source,rb]
313
+ ----------------------------
314
+ # Retrieve adaptive relevance settings
315
+ client.adaptive_relevance_settings(engine_name)
316
+
317
+ # Update adaptive relevance settings for an engine
318
+ body = { curation: { enabled: true } }
319
+ client.put_adaptive_relevance_settings(engine_name, body: body)
320
+
321
+ # List suggestions
322
+ client.list_adaptive_relevance_suggestions(engine_name)
323
+
324
+ # Update adaptive relevance
325
+ client.put_adaptive_relevance_suggestions(engine_name, body: body)
326
+
327
+ # Retrive adaptive relevance
328
+ client.adaptive_relevance_suggestions(engine_name, search_suggestion_query: 'suggestion')
329
+ ----------------------------
330
+
177
331
  === Other API Endpoints
178
332
 
179
333
  [source,rb]
@@ -207,7 +361,7 @@ client.put_search_settings(engine_name, body: body)
207
361
  client.reset_search_settings(engine_name)
208
362
 
209
363
  # Click - Send data about clicked results
210
- client.log_clickthrough(engine_name, query_text: 'query', document_id: 'doc-id')
364
+ client.log_clickthrough(engine_name, body: { query: 'query', document_id: 'doc-id' })
211
365
 
212
366
  # Query Suggestion - Provide relevant query suggestions for incomplete queries
213
367
  client.query_suggestion(engine_name, query: 'incomplete_query')
@@ -6,7 +6,7 @@ This is the official Ruby client for Elastic Enterprise Search.
6
6
  [discrete]
7
7
  === Compatibility
8
8
 
9
- Current development happens in the master branch.
9
+ Current development happens in the main branch.
10
10
 
11
11
  The library is compatible with all Elastic Enterprise Search versions since `7.x` but you **have to use a matching major version**:
12
12
 
@@ -14,11 +14,11 @@ 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
- This library uses https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-transport[elasticsearch-transport], the low-level Ruby client for connecting to an Elasticsearch cluster - also used in the official https://github.com/elastic/elasticsearch-ruby[Elasticsearch Ruby Client].
17
+ This library uses https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-transport[elasticsearch-transport], the low-level Ruby client for connecting to an Elasticsearch cluster - also used in the official https://github.com/elastic/elasticsearch-ruby[Elasticsearch Ruby Client].
18
18
 
19
19
  All requests, if successful, will return an `Elasticsearch::Transport::Transport::Response` instance. You can access the response `body`, `headers` and `status`.
20
20
 
21
- `elasticsearch-transport` defines a https://github.com/elasticsearch/elasticsearch-ruby/blob/master/elasticsearch-transport/lib/elasticsearch/transport/transport/errors.rb[number of exception classes] for various client and server errors, as well as unsuccessful HTTP responses, making it possible to rescue specific exceptions with desired granularity. More details https://github.com/elastic/elasticsearch-ruby/tree/master/elasticsearch-transport#exception-handling[here]. You can find the full documentation for `elasticsearch-transport` at https://rubydoc.info/gems/elasticsearch-transport[RubyDoc].
21
+ `elasticsearch-transport` defines a https://github.com/elasticsearch/elasticsearch-ruby/blob/main/elasticsearch-transport/lib/elasticsearch/transport/transport/errors.rb[number of exception classes] for various client and server errors, as well as unsuccessful HTTP responses, making it possible to rescue specific exceptions with desired granularity. More details https://github.com/elastic/elasticsearch-ruby/tree/main/elasticsearch-transport#exception-handling[here]. You can find the full documentation for `elasticsearch-transport` at https://rubydoc.info/gems/elasticsearch-transport[RubyDoc].
22
22
 
23
23
  The clients pass different options to transport, you can check them out https://rubydoc.info/github/elastic/enterprise-search-ruby/Elastic/EnterpriseSearch/Client[on RubyDocs].
24
24
 
@@ -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]
@@ -0,0 +1,48 @@
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]]
14
+ === 7.15.0 Release notes
15
+
16
+ [discrete]
17
+ ==== General
18
+
19
+ - Tested with Elastic Enterprise Search API version 7.15.0.
20
+ - Better source code documentation in general for API endpoints.
21
+
22
+ [discrete]
23
+ ==== App Search
24
+
25
+ - The test suite was migrated to full integration testing https://clients-ci.elastic.co/view/Ruby/[in Jenkins]. We were using VCR for testing the API, but now we're running the API tests against an instance of Elastic Enterprise Search.
26
+
27
+ - Some APIs that used to work with `GET` query parameters in App Search are now `POST` and the parameters being sent with the body. We'll use the body from `7.15`, but we'll keep supporting arguments parameters in 7.x for backwards compatibility. Some parameters previously required through the generated code don't throw an exception anymore and the error is delegated to server. As mentioned, these should go through the body instead of part of the query parameters, but we still support sending them as query parameters in `7.x` to keep backwards compatibility.
28
+
29
+ [discrete]
30
+ ===== Web Crawler API
31
+
32
+ [CAUTION]
33
+ ====
34
+ The Elastic Enterprise Search web crawler API is a *beta* feature.
35
+ Beta features are subject to change and are not covered by the support SLA of general release (GA) features.
36
+ Elastic plans to promote this feature to GA in a future release.
37
+ ====
38
+
39
+ New Web Crawler API endpoints:
40
+
41
+ `crawler_active_crawl_request`, `crawler_crawl_request`, `crawler_crawl_schedule`, `crawler_domain`, `crawler_domain_validation_result`, `crawler_metrics`, `crawler_overview`, `crawler_process_crawl_denied_urls`, `crawler_process_crawl`, `crawler_url_extraction_result`, `crawler_url_tracing_result`, `crawler_url_validation_result`, `crawler_user_agent`, `create_crawler_crawl_request`, `create_crawler_crawl_rule`, `create_crawler_domain`, `create_crawler_entry_point`, `create_crawler_process_crawl`, `create_crawler_sitemap`, `delete_active_crawl_request`, `delete_crawler_active_crawl_request`, `delete_crawler_crawl_rule`, `delete_crawler_crawl_schedule`, `delete_crawler_domain`, `delete_crawler_entry_point`, `delete_crawler_sitemap`, `list_crawler_crawl_requests`, `list_crawler_process_crawls`, `put_crawler_crawl_rule`, `put_crawler_crawl_schedule`, `put_crawler_domain`, `put_crawler_entry_point`, `put_crawler_sitemap`.
42
+
43
+ Refer to https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/app-search-api.html[App Search API] for more information and examples.
44
+
45
+ [discrete]
46
+ ==== Workplace Search
47
+
48
+ - New APIs: `auto_query_refinement_details`, `triggers_blocklist` and `put_triggers_blocklist`. See https://www.elastic.co/guide/en/enterprise-search-clients/ruby/current/workplace-search-api.html[Workplace Search API] for more information and examples.
@@ -0,0 +1,16 @@
1
+ [[release_notes_716]]
2
+ === 7.16 Release notes
3
+
4
+ [discrete]
5
+ ==== General
6
+
7
+ - Tested with Elastic Enterprise Search API version 7.16.0.
8
+
9
+ [discrete]
10
+ ==== App Search
11
+
12
+ - Adds Adaptive Relevance APIs. The adaptive relevance API is a **beta** feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release. The adaptive relevance API is not available at all Elastic subscription levels. Refer to the Elastic subscriptions pages for https://www.elastic.co/subscriptions/cloud[Elastic Cloud] and https://www.elastic.co/subscriptions[self-managed] deployments: `adaptive_relevance_settings`, `adaptive_relevance_suggestions`, `list adaptive_relevance_suggestions`, `put_adaptive_relevance_settings`, `put_adaptive_relevance_suggestions`.
13
+ - Adds `list_crawler_domains` - Returns a list of crawler domains
14
+
15
+ ==== Workplace Search
16
+ - Adds `list_documents` - List documents from a custom content source
@@ -5,12 +5,16 @@
5
5
  [discrete]
6
6
  === 7.x
7
7
 
8
+ * <<release_notes_716, 7.16.0 Release Notes>>
9
+ * <<release_notes_715, 7.15.0 Release Notes>>
8
10
  * <<release_notes_714, 7.14.0 Release Notes>>
9
11
  * <<release_notes_713, 7.13.0 Release Notes>>
10
12
  * <<release_notes_712, 7.12.0 Release Notes>>
11
13
  * <<release_notes_711, 7.11.0 Release Notes>>
12
14
  * <<release_notes_710, 7.10.0.beta.1 Release Notes>>
13
15
 
16
+ include::716.asciidoc[]
17
+ include::715.asciidoc[]
14
18
  include::714.asciidoc[]
15
19
  include::713.asciidoc[]
16
20
  include::712.asciidoc[]
@@ -37,6 +37,9 @@ require 'base64'
37
37
  path = File.expand_path("#{File.dirname(__FILE__)}/icon.png")
38
38
  icon = Base64.strict_encode64(File.read(path))
39
39
  response = client.put_content_source_icons(content_source_id, main_icon: icon, alt_icon: icon)
40
+
41
+ # Retrieves a content source's automatic query refinement details
42
+ client.auto_query_refinement_details(content_source_id)
40
43
  ----------------------------
41
44
 
42
45
  === Documents
@@ -56,6 +59,9 @@ response = client.index_documents(content_source_id, body: documents)
56
59
  # Retrieve a document by ID from a specified content source
57
60
  client.document(content_source_id, document_id: '75015d85370d')
58
61
 
62
+ # List documents from a custom content source
63
+ client.list_documents(content_source_id)
64
+
59
65
  # Delete Documents
60
66
  client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])
61
67
 
@@ -218,3 +224,14 @@ client.current_user
218
224
  # Get the current user and return the access token
219
225
  client.current_user(get_token: true)
220
226
  ----------------------------
227
+
228
+ === Triggers Blocklist
229
+
230
+ [source,rb]
231
+ ----------------------------
232
+ # Get current triggers blocklist
233
+ client.triggers_blocklist
234
+
235
+ # Update current triggers blocklist
236
+ client.put_triggers_blocklist(body: { blocklist: ['in', 'it', 'page'] })
237
+ ----------------------------
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
47
47
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
48
48
  s.require_paths = ['lib']
49
49
 
50
- s.add_dependency 'elasticsearch-transport', '~> 7.13.0'
50
+ s.add_dependency 'elasticsearch-transport', '>= 7.11'
51
51
  s.add_runtime_dependency 'jwt', '>= 1.5', '< 3.0'
52
52
  s.add_development_dependency 'awesome_print'
53
53
  s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION)
@@ -0,0 +1,51 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to Elasticsearch B.V. under one or more contributor
4
+ # license agreements. See the NOTICE file distributed with
5
+ # this work for additional information regarding copyright
6
+ # ownership. Elasticsearch B.V. licenses this file to you under
7
+ # the Apache License, Version 2.0 (the "License"); you may
8
+ # not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ module Elastic
21
+ module EnterpriseSearch
22
+ module AppSearch
23
+ module Actions
24
+ # AdaptiveRelevanceSettings - Retrieve adaptive relevance settings
25
+ # Retrieve adaptive relevance settings
26
+ #
27
+ # @param engine_name [String] Name of the engine (*Required*)
28
+ # @param arguments [Hash] endpoint arguments
29
+ # @option arguments [Hash] :body The request body
30
+ # @option arguments [Hash] :headers optional HTTP headers to send with the request
31
+ #
32
+ # @see https://www.elastic.co/guide/en/app-search/current/adaptive-relevance-api-reference.html#adaptive-relevance-api-get-engine-adaptive-relevance-settings
33
+ #
34
+ def adaptive_relevance_settings(engine_name, arguments = {})
35
+ raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
+
37
+ body = arguments.delete(:body) || {}
38
+ headers = arguments.delete(:headers) || {}
39
+
40
+ request(
41
+ :get,
42
+ "api/as/v0/engines/#{engine_name}/adaptive_relevance/settings/",
43
+ arguments,
44
+ body,
45
+ headers
46
+ )
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to Elasticsearch B.V. under one or more contributor
4
+ # license agreements. See the NOTICE file distributed with
5
+ # this work for additional information regarding copyright
6
+ # ownership. Elasticsearch B.V. licenses this file to you under
7
+ # the Apache License, Version 2.0 (the "License"); you may
8
+ # not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ module Elastic
21
+ module EnterpriseSearch
22
+ module AppSearch
23
+ module Actions
24
+ # AdaptiveRelevanceSuggestions - Retrieve adaptive relevance
25
+ # Retrieve adaptive relevance for a single query
26
+ #
27
+ # @param engine_name [String] Name of the engine (*Required*)
28
+ # @param arguments [Hash] endpoint arguments
29
+ # @option arguments [String] :search_suggestion_query Query to obtain suggestions (*Required*)
30
+ # @option arguments [Hash] :body
31
+ # @option body :page
32
+ # @option body :filters
33
+ # @option arguments [Hash] :headers optional HTTP headers to send with the request
34
+ #
35
+ # @see https://www.elastic.co/guide/en/app-search/current/adaptive-relevance-api-reference.html#adaptive-relevance-api-get-engine-adaptive-relevance-suggestions-query
36
+ #
37
+ def adaptive_relevance_suggestions(engine_name, arguments = {})
38
+ raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
39
+ raise ArgumentError, "Required parameter 'search_suggestion_query' missing" unless arguments[:search_suggestion_query]
40
+
41
+ search_suggestion_query = arguments[:search_suggestion_query]
42
+ body = arguments.delete(:body) || {}
43
+ headers = arguments.delete(:headers) || {}
44
+
45
+ request(
46
+ :post,
47
+ "api/as/v0/engines/#{engine_name}/adaptive_relevance/suggestions/#{search_suggestion_query}/",
48
+ arguments,
49
+ body,
50
+ headers
51
+ )
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -21,9 +21,10 @@ module Elastic
21
21
  module EnterpriseSearch
22
22
  module AppSearch
23
23
  module Actions
24
- # Engine - Add a source engine to an existing meta engine
24
+ # Engines - Add a source engine
25
+ # Adds a source engine to a given meta engine
25
26
  #
26
- # @param engine_name [String] (*Required*)
27
+ # @param engine_name [String] Name of the engine (*Required*)
27
28
  # @param arguments [Hash] endpoint arguments
28
29
  # @option arguments [Array] :source_engines List of engine names (*Required*)
29
30
  # @option arguments [Hash] :headers optional HTTP headers to send with the request