elastic-enterprise-search 7.17.1 → 8.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (158) 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/README.md +1 -1
  10. data/docs/guide/app-search-api.asciidoc +15 -9
  11. data/docs/guide/overview.asciidoc +2 -2
  12. data/docs/guide/release_notes/712.asciidoc +10 -0
  13. data/docs/guide/release_notes/714.asciidoc +0 -12
  14. data/docs/guide/release_notes/715.asciidoc +0 -12
  15. data/docs/guide/release_notes/717.asciidoc +0 -12
  16. data/docs/guide/release_notes/80.asciidoc +14 -0
  17. data/docs/guide/release_notes/index.asciidoc +7 -0
  18. data/docs/guide/workplace-search-api.asciidoc +0 -3
  19. data/elastic-enterprise-search.gemspec +3 -3
  20. data/lib/elastic/api/response.rb +52 -0
  21. data/lib/elastic/{workplace-search/api/user_permissions.rb → app-search/api/adaptive_relevance_settings.rb} +10 -15
  22. data/lib/elastic/{workplace-search/api/add_user_permissions.rb → app-search/api/adaptive_relevance_suggestions.rb} +20 -14
  23. data/lib/elastic/app-search/api/add_meta_engine_source.rb +4 -5
  24. data/lib/elastic/app-search/api/api_key.rb +4 -6
  25. data/lib/elastic/app-search/api/api_logs.rb +8 -15
  26. data/lib/elastic/app-search/api/count_analytics.rb +5 -5
  27. data/lib/elastic/app-search/api/crawler_active_crawl_request.rb +4 -7
  28. data/lib/elastic/app-search/api/crawler_crawl_request.rb +6 -8
  29. data/lib/elastic/app-search/api/crawler_crawl_schedule.rb +4 -7
  30. data/lib/elastic/app-search/api/crawler_domain.rb +6 -8
  31. data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +6 -5
  32. data/lib/elastic/app-search/api/crawler_metrics.rb +3 -6
  33. data/lib/elastic/app-search/api/crawler_overview.rb +4 -7
  34. data/lib/elastic/app-search/api/crawler_process_crawl.rb +6 -8
  35. data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +6 -8
  36. data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +6 -6
  37. data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +7 -7
  38. data/lib/elastic/app-search/api/crawler_url_validation_result.rb +7 -7
  39. data/lib/elastic/app-search/api/crawler_user_agent.rb +3 -6
  40. data/lib/elastic/app-search/api/create_api_key.rb +10 -10
  41. data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +9 -5
  42. data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +13 -11
  43. data/lib/elastic/app-search/api/create_crawler_domain.rb +8 -8
  44. data/lib/elastic/app-search/api/create_crawler_entry_point.rb +10 -8
  45. data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +6 -6
  46. data/lib/elastic/app-search/api/create_crawler_sitemap.rb +10 -8
  47. data/lib/elastic/app-search/api/create_curation.rb +10 -8
  48. data/lib/elastic/app-search/api/create_engine.rb +8 -7
  49. data/lib/elastic/app-search/api/create_synonym_set.rb +6 -6
  50. data/lib/elastic/app-search/api/curation.rb +5 -7
  51. data/lib/elastic/app-search/api/delete_api_key.rb +4 -6
  52. data/lib/elastic/app-search/api/delete_crawler_active_crawl_request.rb +4 -7
  53. data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +7 -9
  54. data/lib/elastic/app-search/api/delete_crawler_crawl_schedule.rb +4 -7
  55. data/lib/elastic/app-search/api/delete_crawler_domain.rb +6 -8
  56. data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +7 -9
  57. data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +7 -9
  58. data/lib/elastic/app-search/api/delete_curation.rb +5 -7
  59. data/lib/elastic/app-search/api/delete_documents.rb +4 -5
  60. data/lib/elastic/app-search/api/delete_engine.rb +3 -6
  61. data/lib/elastic/app-search/api/delete_meta_engine_source.rb +4 -4
  62. data/lib/elastic/app-search/api/delete_synonym_set.rb +5 -7
  63. data/lib/elastic/app-search/api/documents.rb +5 -5
  64. data/lib/elastic/app-search/api/engine.rb +3 -6
  65. data/lib/elastic/app-search/api/index_documents.rb +4 -5
  66. data/lib/elastic/{workplace-search/api/remove_user_permissions.rb → app-search/api/list_adaptive_relevance_suggestions.rb} +13 -14
  67. data/lib/elastic/app-search/api/list_api_keys.rb +2 -5
  68. data/lib/elastic/app-search/api/list_crawler_crawl_requests.rb +6 -8
  69. data/lib/elastic/{workplace-search/api/list_permissions.rb → app-search/api/list_crawler_domains.rb} +12 -13
  70. data/lib/elastic/app-search/api/list_crawler_process_crawls.rb +6 -7
  71. data/lib/elastic/app-search/api/list_curations.rb +3 -6
  72. data/lib/elastic/app-search/api/list_documents.rb +3 -6
  73. data/lib/elastic/app-search/api/list_engines.rb +2 -5
  74. data/lib/elastic/app-search/api/list_synonym_sets.rb +3 -6
  75. data/lib/elastic/app-search/api/log_clickthrough.rb +9 -8
  76. data/lib/elastic/{workplace-search/api/put_user_permissions.rb → app-search/api/put_adaptive_relevance_settings.rb} +13 -14
  77. data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +51 -0
  78. data/lib/elastic/app-search/api/put_api_key.rb +11 -10
  79. data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +14 -12
  80. data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +8 -7
  81. data/lib/elastic/app-search/api/put_crawler_domain.rb +9 -9
  82. data/lib/elastic/app-search/api/put_crawler_entry_point.rb +11 -9
  83. data/lib/elastic/app-search/api/put_crawler_sitemap.rb +11 -9
  84. data/lib/elastic/app-search/api/put_curation.rb +11 -9
  85. data/lib/elastic/app-search/api/put_documents.rb +4 -4
  86. data/lib/elastic/app-search/api/put_schema.rb +4 -4
  87. data/lib/elastic/app-search/api/put_search_settings.rb +6 -6
  88. data/lib/elastic/app-search/api/put_synonym_set.rb +8 -8
  89. data/lib/elastic/app-search/api/query_suggestion.rb +5 -5
  90. data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +56 -0
  91. data/lib/elastic/app-search/api/reset_search_settings.rb +3 -6
  92. data/lib/elastic/app-search/api/schema.rb +3 -6
  93. data/lib/elastic/app-search/api/search.rb +6 -5
  94. data/lib/elastic/app-search/api/search_settings.rb +3 -6
  95. data/lib/elastic/app-search/api/synonym_set.rb +5 -7
  96. data/lib/elastic/app-search/api/top_clicks_analytics.rb +5 -5
  97. data/lib/elastic/app-search/api/top_queries_analytics.rb +4 -4
  98. data/lib/elastic/enterprise-search/api/health.rb +2 -3
  99. data/lib/elastic/enterprise-search/api/put_read_only.rb +6 -4
  100. data/lib/elastic/enterprise-search/api/read_only.rb +2 -3
  101. data/lib/elastic/enterprise-search/api/stats.rb +2 -3
  102. data/lib/elastic/enterprise-search/api/version.rb +2 -3
  103. data/lib/elastic/enterprise-search/client.rb +2 -13
  104. data/lib/elastic/enterprise-search/request.rb +6 -4
  105. data/lib/elastic/enterprise-search/version.rb +1 -1
  106. data/lib/elastic/workplace-search/api/auto_query_refinement_details.rb +3 -4
  107. data/lib/elastic/workplace-search/api/command_sync_jobs.rb +4 -5
  108. data/lib/elastic/workplace-search/api/content_source.rb +3 -4
  109. data/lib/elastic/workplace-search/api/create_analytics_event.rb +16 -12
  110. data/lib/elastic/workplace-search/api/create_batch_synonym_sets.rb +4 -3
  111. data/lib/elastic/workplace-search/api/create_content_source.rb +6 -5
  112. data/lib/elastic/workplace-search/api/create_external_identity.rb +11 -6
  113. data/lib/elastic/workplace-search/api/current_user.rb +3 -5
  114. data/lib/elastic/workplace-search/api/delete_content_source.rb +3 -4
  115. data/lib/elastic/workplace-search/api/delete_documents.rb +4 -4
  116. data/lib/elastic/workplace-search/api/delete_documents_by_query.rb +4 -3
  117. data/lib/elastic/workplace-search/api/delete_external_identity.rb +7 -9
  118. data/lib/elastic/workplace-search/api/delete_synonym_set.rb +3 -5
  119. data/lib/elastic/workplace-search/api/document.rb +4 -6
  120. data/lib/elastic/workplace-search/api/external_identity.rb +7 -9
  121. data/lib/elastic/workplace-search/api/index_documents.rb +3 -4
  122. data/lib/elastic/workplace-search/api/list_content_sources.rb +2 -3
  123. data/lib/elastic/workplace-search/api/list_documents.rb +4 -5
  124. data/lib/elastic/workplace-search/api/list_external_identities.rb +3 -4
  125. data/lib/elastic/workplace-search/api/list_synonym_sets.rb +1 -2
  126. data/lib/elastic/workplace-search/api/put_content_source.rb +6 -6
  127. data/lib/elastic/workplace-search/api/put_content_source_icons.rb +6 -6
  128. data/lib/elastic/workplace-search/api/put_external_identity.rb +11 -10
  129. data/lib/elastic/workplace-search/api/put_synonym_set.rb +4 -4
  130. data/lib/elastic/workplace-search/api/put_triggers_blocklist.rb +3 -5
  131. data/lib/elastic/workplace-search/api/search.rb +13 -13
  132. data/lib/elastic/workplace-search/api/synonym_set.rb +3 -5
  133. data/lib/elastic/workplace-search/api/triggers_blocklist.rb +3 -3
  134. data/spec/enterprise-search/request_spec.rb +1 -1
  135. data/spec/fixtures/vcr/workplace_search/create_analytics_event.yml +1 -1
  136. data/spec/fixtures/vcr/workplace_search/oauth_request_token.yml +1 -1
  137. data/spec/fixtures/vcr/workplace_search/search_request.yml +1 -1
  138. data/spec/integration/app-search/adaptive_relevance_settings_spec.rb +60 -0
  139. data/spec/integration/app-search/adaptive_relevance_suggestions_spec.rb +54 -0
  140. data/spec/integration/app-search/api_logs_spec.rb +11 -3
  141. data/spec/integration/app-search/app_search_helper.rb +2 -2
  142. data/spec/integration/app-search/count_analytics_spec.rb +3 -2
  143. data/spec/integration/app-search/crawler_domain_spec.rb +16 -0
  144. data/spec/integration/app-search/curations_spec.rb +15 -9
  145. data/spec/integration/app-search/engines_spec.rb +24 -26
  146. data/spec/integration/app-search/log_clickthrough_spec.rb +1 -1
  147. data/spec/integration/app-search/meta_engines_spec.rb +5 -5
  148. data/spec/integration/app-search/search_and_multiple_search_spec.rb +1 -1
  149. data/spec/integration/workplace-search/content_sources_spec.rb +6 -6
  150. data/spec/integration/workplace-search/documents_spec.rb +20 -10
  151. data/spec/integration/workplace-search/external_identities_spec.rb +26 -16
  152. data/spec/integration/workplace-search/triggers_spec.rb +2 -2
  153. data/spec/integration/workplace-search/users_spec.rb +0 -6
  154. metadata +28 -22
  155. data/.ci/jobs/elastic+enterprise-search-ruby+7.10.0.beta.1.yml +0 -12
  156. data/.github/compatibility/Gemfile +0 -23
  157. data/.github/workflows/compatibility.yml +0 -20
  158. data/spec/integration/workplace-search/permissions_spec.rb +0 -77
@@ -24,23 +24,20 @@ module Elastic
24
24
  # Credentials - Retrieve all API keys
25
25
  # List the details of all API keys
26
26
  #
27
- # @param arguments [Hash] endpoint arguments
27
+ # @param [Hash] arguments endpoint arguments
28
28
  # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
29
29
  # @option arguments [Integer] :page_size The number of results per page
30
- # @option arguments [Hash] :body The request body
31
30
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
31
  #
33
32
  # @see https://www.elastic.co/guide/en/app-search/current/credentials.html#credentials-all
34
33
  #
35
34
  def list_api_keys(arguments = {})
36
- body = arguments.delete(:body) || {}
37
35
  headers = arguments.delete(:headers) || {}
38
-
39
36
  request(
40
37
  :get,
41
38
  'api/as/v1/credentials/',
42
39
  arguments,
43
- body,
40
+ nil,
44
41
  headers
45
42
  )
46
43
  end
@@ -24,10 +24,10 @@ module Elastic
24
24
  # Crawler - List crawl requests
25
25
  # Returns a list of latest crawl requests for a given engine.
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
29
- # @option arguments [Integer] :limit The number of results
30
- # @option arguments [Hash] :body The request body
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
+ # @option arguments [Integer] :page_size The number of results per page
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
33
33
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-get-crawler-crawl-requests
@@ -35,14 +35,12 @@ module Elastic
35
35
  def list_crawler_crawl_requests(engine_name, arguments = {})
36
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
37
 
38
- body = arguments.delete(:body) || {}
39
38
  headers = arguments.delete(:headers) || {}
40
-
41
39
  request(
42
40
  :get,
43
- "api/as/v0/engines/#{engine_name}/crawler/crawl_requests/",
41
+ "api/as/v1/engines/#{engine_name}/crawler/crawl_requests/",
44
42
  arguments,
45
- body,
43
+ nil,
46
44
  headers
47
45
  )
48
46
  end
@@ -19,29 +19,28 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- module WorkplaceSearch
22
+ module AppSearch
23
23
  module Actions
24
- # Permissions - Lists all permissions for all users
25
- # List all permissions for all users
24
+ # Crawler - List crawler domains
25
+ # Returns a list of crawler domains
26
26
  #
27
- # @param content_source_id [String] Unique ID for a Custom API source, provided upon creation of a Custom API Source (*Required*)
28
- # @param arguments [Hash] endpoint arguments
29
- # @option arguments [Integer] :current_page Which page of results to request
30
- # @option arguments [Integer] :page_size The number of results to return in a page
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
+ # @option arguments [Integer] :page_size The number of results per page
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
33
- # @see https://www.elastic.co/guide/en/workplace-search/current/workplace-search-document-permissions-api.html#list
33
+ # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-get-crawler-domain
34
34
  #
35
- def list_permissions(content_source_id, arguments = {})
36
- raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
35
+ def list_crawler_domains(engine_name, arguments = {})
36
+ raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
37
 
38
38
  headers = arguments.delete(:headers) || {}
39
-
40
39
  request(
41
40
  :get,
42
- "api/ws/v1/sources/#{content_source_id}/permissions/",
41
+ "api/as/v1/engines/#{engine_name}/crawler/domains/",
43
42
  arguments,
44
- {},
43
+ nil,
45
44
  headers
46
45
  )
47
46
  end
@@ -24,9 +24,10 @@ module Elastic
24
24
  # Crawler - List process crawls
25
25
  # Returns a list of latest process crawls for a given engine
26
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
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
+ # @option arguments [Integer] :page_size The number of results per page
30
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
31
32
  #
32
33
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-get-crawler-process-crawls
@@ -34,14 +35,12 @@ module Elastic
34
35
  def list_crawler_process_crawls(engine_name, arguments = {})
35
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
37
 
37
- body = arguments.delete(:body) || {}
38
38
  headers = arguments.delete(:headers) || {}
39
-
40
39
  request(
41
40
  :get,
42
- "api/as/v0/engines/#{engine_name}/crawler/process_crawls/",
41
+ "api/as/v1/engines/#{engine_name}/crawler/process_crawls/",
43
42
  arguments,
44
- body,
43
+ nil,
45
44
  headers
46
45
  )
47
46
  end
@@ -24,11 +24,10 @@ module Elastic
24
24
  # Curations - Retrieve all curations
25
25
  # Retrieve available curations for the given engine
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
30
  # @option arguments [Integer] :page_size The number of results per page
31
- # @option arguments [Hash] :body The request body
32
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
33
32
  #
34
33
  # @see https://www.elastic.co/guide/en/app-search/current/curations.html#curations-read
@@ -36,14 +35,12 @@ module Elastic
36
35
  def list_curations(engine_name, arguments = {})
37
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
37
 
39
- body = arguments.delete(:body) || {}
40
38
  headers = arguments.delete(:headers) || {}
41
-
42
39
  request(
43
40
  :get,
44
41
  "api/as/v1/engines/#{engine_name}/curations/",
45
42
  arguments,
46
- body,
43
+ nil,
47
44
  headers
48
45
  )
49
46
  end
@@ -24,11 +24,10 @@ module Elastic
24
24
  # Documents - Retrieve all documents
25
25
  # Lists up to 10,000 documents
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
30
  # @option arguments [Integer] :page_size The number of results per page
31
- # @option arguments [Hash] :body The request body
32
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
33
32
  #
34
33
  # @see https://www.elastic.co/guide/en/app-search/current/documents.html#documents-list
@@ -36,14 +35,12 @@ module Elastic
36
35
  def list_documents(engine_name, arguments = {})
37
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
37
 
39
- body = arguments.delete(:body) || {}
40
38
  headers = arguments.delete(:headers) || {}
41
-
42
39
  request(
43
40
  :get,
44
41
  "api/as/v1/engines/#{engine_name}/documents/list/",
45
42
  arguments,
46
- body,
43
+ nil,
47
44
  headers
48
45
  )
49
46
  end
@@ -24,23 +24,20 @@ module Elastic
24
24
  # Engines - Retrieve all engines
25
25
  # Retrieves all engines with optional pagination support
26
26
  #
27
- # @param arguments [Hash] endpoint arguments
27
+ # @param [Hash] arguments endpoint arguments
28
28
  # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
29
29
  # @option arguments [Integer] :page_size The number of results per page
30
- # @option arguments [Hash] :body The request body
31
30
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
31
  #
33
32
  # @see https://www.elastic.co/guide/en/app-search/current/engines.html#engines-list
34
33
  #
35
34
  def list_engines(arguments = {})
36
- body = arguments.delete(:body) || {}
37
35
  headers = arguments.delete(:headers) || {}
38
-
39
36
  request(
40
37
  :get,
41
38
  'api/as/v1/engines/',
42
39
  arguments,
43
- body,
40
+ nil,
44
41
  headers
45
42
  )
46
43
  end
@@ -24,11 +24,10 @@ module Elastic
24
24
  # Synonyms - Retrieve all synonym sets
25
25
  # Retrieves all available synonym sets for the engine
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [Integer] :current_page The page to fetch. Defaults to 1
30
30
  # @option arguments [Integer] :page_size The number of results per page
31
- # @option arguments [Hash] :body The request body
32
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
33
32
  #
34
33
  # @see https://www.elastic.co/guide/en/app-search/current/synonyms.html#synonyms-get
@@ -36,14 +35,12 @@ module Elastic
36
35
  def list_synonym_sets(engine_name, arguments = {})
37
36
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
37
 
39
- body = arguments.delete(:body) || {}
40
38
  headers = arguments.delete(:headers) || {}
41
-
42
39
  request(
43
40
  :get,
44
41
  "api/as/v1/engines/#{engine_name}/synonyms/",
45
42
  arguments,
46
- body,
43
+ nil,
47
44
  headers
48
45
  )
49
46
  end
@@ -24,23 +24,24 @@ module Elastic
24
24
  # Click - Tracks results that were clicked after a query
25
25
  # Tracks results that were clicked after a query
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
29
- # @option arguments :body Search request parameters
30
- # @option body [String] :query Search query text (*Required*)
31
- # @option body [String] :document_id The id of the document that was clicked on (*Required*)
32
- # @option body [String] :request_id The request id returned in the meta tag of a search API response
33
- # @option body [Array] :tags Array of strings representing additional information you wish to track with the clickthrough. You may submit up to 16 tags, and each may be up to 64 characters in length.
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Hash] :body (Required: query, document_id)
30
+ # @option body [string] :query
31
+ # @option body [string] :request_id
32
+ # @option body :document_id
33
+ # @option body [Array<string>] :tags
34
34
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
35
35
  #
36
36
  # @see https://www.elastic.co/guide/en/app-search/current/clickthrough.html
37
37
  #
38
38
  def log_clickthrough(engine_name, arguments = {})
39
39
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
40
+ raise ArgumentError, "Required parameter 'body (query,document_id)' missing" unless arguments[:body]
40
41
 
41
42
  body = arguments.delete(:body) || {}
42
- headers = arguments.delete(:headers) || {}
43
43
 
44
+ headers = arguments.delete(:headers) || {}
44
45
  request(
45
46
  :post,
46
47
  "api/as/v1/engines/#{engine_name}/click/",
@@ -19,30 +19,29 @@
19
19
 
20
20
  module Elastic
21
21
  module EnterpriseSearch
22
- module WorkplaceSearch
22
+ module AppSearch
23
23
  module Actions
24
- # Permissions - Creates a new set of permissions or over-writes all existing permissions
25
- # Create a set of permissions or overwrite existing permissions
24
+ # AdaptiveRelevanceSettings - Update adaptive relevance settings
25
+ # Update adaptive relevance settings
26
26
  #
27
- # @param content_source_id [String] Unique ID for a Custom API source, provided upon creation of a Custom API Source (*Required*)
28
- # @param arguments [Hash] endpoint arguments
29
- # @option arguments [String] :user The username in context (*Required*)
30
- # @option arguments [Array] :body List of permissions
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Hash] :body (Required: curation)
30
+ # @option body [Hash] :curation (Required: )
31
31
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
32
32
  #
33
- # @see https://www.elastic.co/guide/en/workplace-search/current/workplace-search-document-permissions-api.html#add-all
33
+ # @see https://www.elastic.co/guide/en/app-search/current/adaptive-relevance-api-reference.html#adaptive-relevance-api-put-engine-adaptive-relevance-settings
34
34
  #
35
- def put_user_permissions(content_source_id, arguments = {})
36
- raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
37
- raise ArgumentError, "Required parameter 'user' missing" unless arguments[:user]
35
+ def put_adaptive_relevance_settings(engine_name, arguments = {})
36
+ raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
37
+ raise ArgumentError, "Required parameter 'body (curation)' missing" unless arguments[:body]
38
38
 
39
- user = arguments[:user]
40
39
  body = arguments.delete(:body) || {}
41
- headers = arguments.delete(:headers) || {}
42
40
 
41
+ headers = arguments.delete(:headers) || {}
43
42
  request(
44
43
  :put,
45
- "api/ws/v1/sources/#{content_source_id}/permissions/#{user}/",
44
+ "api/as/v0/engines/#{engine_name}/adaptive_relevance/settings/",
46
45
  arguments,
47
46
  body,
48
47
  headers
@@ -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
+ # AdaptiveRelevanceSuggestions - Update adaptive relevance
25
+ # Update adaptive relevance
26
+ #
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Array<Hash> { query: [string] }, { type: [] }, { status: [] }] :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-put-engine-adaptive-relevance-suggestions
33
+ #
34
+ def put_adaptive_relevance_suggestions(engine_name, arguments = {})
35
+ raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
36
+
37
+ body = arguments.delete(:body) || {}
38
+
39
+ headers = arguments.delete(:headers) || {}
40
+ request(
41
+ :put,
42
+ "api/as/v0/engines/#{engine_name}/adaptive_relevance/suggestions/",
43
+ arguments,
44
+ body,
45
+ headers
46
+ )
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -24,27 +24,28 @@ module Elastic
24
24
  # Credentials - Update an API key
25
25
  # Updates an API key
26
26
  #
27
- # @param arguments [Hash] endpoint arguments
27
+ # @param [Hash] arguments endpoint arguments
28
28
  # @option arguments [String] :api_key_name Name of an API key (*Required*)
29
- # @option arguments [Hash] :body Details of an API key (Required: name, type)
30
- # @option body [String] :id
31
- # @option body [String] :name (*Required)
32
- # @option body [String] :type (*Required)
33
- # @option body [Boolean] :access_all_engines
29
+ # @option arguments [Hash] :body (Required: name, type)
30
+ # @option body [string] :id
31
+ # @option body [string] :name
32
+ # @option body [string] :type
33
+ # @option body [boolean] :access_all_engines
34
34
  # @option body :engines
35
- # @option body [Boolean] :write
36
- # @option body [Boolean] :read
35
+ # @option body [boolean] :write
36
+ # @option body [boolean] :read
37
37
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
38
38
  #
39
39
  # @see https://www.elastic.co/guide/en/app-search/current/credentials.html#credentials-update
40
40
  #
41
41
  def put_api_key(arguments = {})
42
42
  raise ArgumentError, "Required parameter 'api_key_name' missing" unless arguments[:api_key_name]
43
+ raise ArgumentError, "Required parameter 'body (name,type)' missing" unless arguments[:body]
43
44
 
44
- api_key_name = arguments[:api_key_name]
45
+ api_key_name = arguments.delete(:api_key_name)
45
46
  body = arguments.delete(:body) || {}
46
- headers = arguments.delete(:headers) || {}
47
47
 
48
+ headers = arguments.delete(:headers) || {}
48
49
  request(
49
50
  :put,
50
51
  "api/as/v1/credentials/#{api_key_name}/",
@@ -24,16 +24,17 @@ module Elastic
24
24
  # Crawler - Update a crawl rule
25
25
  # Updates crawl rule configuration
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [String] :domain_id Crawler Domain ID (*Required*)
30
30
  # @option arguments [String] :crawl_rule_id Crawl Rule ID (*Required*)
31
- # @option arguments [Hash] :body (Required: order, policy, rule, pattern)
32
- # @option body [String] :id
33
- # @option body [Integer] :order (*Required)
34
- # @option body [String] :policy (*Required)
35
- # @option body [String] :rule (*Required)
36
- # @option body [String] :pattern (*Required)
31
+ # @option arguments [Hash] :body (Required: order, policy, rule, pattern)
32
+ # @option body [string] :id
33
+ # @option body [integer] :order
34
+ # @option body [string] :policy
35
+ # @option body [string] :rule
36
+ # @option body [string] :pattern
37
+ # @option body [string] :created_at
37
38
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
38
39
  #
39
40
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-put-crawl-rule
@@ -42,15 +43,16 @@ module Elastic
42
43
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
43
44
  raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
44
45
  raise ArgumentError, "Required parameter 'crawl_rule_id' missing" unless arguments[:crawl_rule_id]
46
+ raise ArgumentError, "Required parameter 'body (order,policy,rule,pattern)' missing" unless arguments[:body]
45
47
 
46
- domain_id = arguments[:domain_id]
47
- crawl_rule_id = arguments[:crawl_rule_id]
48
+ domain_id = arguments.delete(:domain_id)
49
+ crawl_rule_id = arguments.delete(:crawl_rule_id)
48
50
  body = arguments.delete(:body) || {}
49
- headers = arguments.delete(:headers) || {}
50
51
 
52
+ headers = arguments.delete(:headers) || {}
51
53
  request(
52
54
  :put,
53
- "api/as/v0/engines/#{engine_name}/crawler/domains/#{domain_id}/crawl_rules/#{crawl_rule_id}/",
55
+ "api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/crawl_rules/#{crawl_rule_id}/",
54
56
  arguments,
55
57
  body,
56
58
  headers
@@ -24,24 +24,25 @@ module Elastic
24
24
  # Crawler - Set crawl schedule
25
25
  # Sets up a crawl schedule for a given engine
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
29
- # @option arguments [Hash] :body (Required: frequency, unit)
30
- # @option body [Integer] :frequency (*Required)
31
- # @option body [String] :unit (*Required)
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
+ # @option arguments [Hash] :body (Required: frequency, unit)
30
+ # @option body [integer] :frequency
31
+ # @option body [string] :unit
32
32
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
33
33
  #
34
34
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-put-crawler-crawl-schedule
35
35
  #
36
36
  def put_crawler_crawl_schedule(engine_name, arguments = {})
37
37
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
38
+ raise ArgumentError, "Required parameter 'body (frequency,unit)' missing" unless arguments[:body]
38
39
 
39
40
  body = arguments.delete(:body) || {}
40
- headers = arguments.delete(:headers) || {}
41
41
 
42
+ headers = arguments.delete(:headers) || {}
42
43
  request(
43
44
  :put,
44
- "api/as/v0/engines/#{engine_name}/crawler/crawl_schedule/",
45
+ "api/as/v1/engines/#{engine_name}/crawler/crawl_schedule/",
45
46
  arguments,
46
47
  body,
47
48
  headers
@@ -24,14 +24,14 @@ module Elastic
24
24
  # Crawler - Update domain configuration
25
25
  # Updates crawler domain configuration for a given domain
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [String] :domain_id Crawler Domain ID (*Required*)
30
30
  # @option arguments [Hash] :body
31
- # @option body [String] :name
32
- # @option body [Array] :entry_points
33
- # @option body [Array] :crawl_rules
34
- # @option body [Array] :sitemaps
31
+ # @option body [string] :name
32
+ # @option body [Array<object>] :entry_points
33
+ # @option body [Array<object>] :crawl_rules
34
+ # @option body [Array<object>] :sitemaps
35
35
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
36
36
  #
37
37
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-put-crawler-domain
@@ -40,13 +40,13 @@ module Elastic
40
40
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
41
41
  raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
42
42
 
43
- domain_id = arguments[:domain_id]
43
+ domain_id = arguments.delete(:domain_id)
44
44
  body = arguments.delete(:body) || {}
45
- headers = arguments.delete(:headers) || {}
46
45
 
46
+ headers = arguments.delete(:headers) || {}
47
47
  request(
48
48
  :put,
49
- "api/as/v0/engines/#{engine_name}/crawler/domains/#{domain_id}/",
49
+ "api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/",
50
50
  arguments,
51
51
  body,
52
52
  headers
@@ -24,13 +24,14 @@ module Elastic
24
24
  # Crawler - Update a crawler entry point
25
25
  # Updates a crawler entry point with a new value
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [String] :domain_id Crawler Domain ID (*Required*)
30
30
  # @option arguments [String] :entry_point_id Crawler Entry Point identifier (*Required*)
31
- # @option arguments [Hash] :body (Required: value)
32
- # @option body [String] :id
33
- # @option body [String] :value (*Required)
31
+ # @option arguments [Hash] :body (Required: value)
32
+ # @option body [string] :id
33
+ # @option body [string] :value
34
+ # @option body [string] :created_at
34
35
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
35
36
  #
36
37
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-put-entry-point
@@ -39,15 +40,16 @@ module Elastic
39
40
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
40
41
  raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
41
42
  raise ArgumentError, "Required parameter 'entry_point_id' missing" unless arguments[:entry_point_id]
43
+ raise ArgumentError, "Required parameter 'body (value)' missing" unless arguments[:body]
42
44
 
43
- domain_id = arguments[:domain_id]
44
- entry_point_id = arguments[:entry_point_id]
45
+ domain_id = arguments.delete(:domain_id)
46
+ entry_point_id = arguments.delete(:entry_point_id)
45
47
  body = arguments.delete(:body) || {}
46
- headers = arguments.delete(:headers) || {}
47
48
 
49
+ headers = arguments.delete(:headers) || {}
48
50
  request(
49
51
  :put,
50
- "api/as/v0/engines/#{engine_name}/crawler/domains/#{domain_id}/entry_points/#{entry_point_id}/",
52
+ "api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/entry_points/#{entry_point_id}/",
51
53
  arguments,
52
54
  body,
53
55
  headers
@@ -24,13 +24,14 @@ module Elastic
24
24
  # Crawler - Update a sitemap
25
25
  # Updates sitemap configuration
26
26
  #
27
- # @param engine_name [String] Name of the engine (*Required*)
28
- # @param arguments [Hash] endpoint arguments
27
+ # @param [String] engine_name Name of the engine (*Required*)
28
+ # @param [Hash] arguments endpoint arguments
29
29
  # @option arguments [String] :domain_id Crawler Domain ID (*Required*)
30
30
  # @option arguments [String] :sitemap_id Sitemap ID (*Required*)
31
- # @option arguments [Hash] :body (Required: url)
32
- # @option body [String] :id
33
- # @option body [String] :url (*Required)
31
+ # @option arguments [Hash] :body (Required: url)
32
+ # @option body [string] :id
33
+ # @option body :url
34
+ # @option body [string] :created_at
34
35
  # @option arguments [Hash] :headers optional HTTP headers to send with the request
35
36
  #
36
37
  # @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-put-sitemap
@@ -39,15 +40,16 @@ module Elastic
39
40
  raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
40
41
  raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
41
42
  raise ArgumentError, "Required parameter 'sitemap_id' missing" unless arguments[:sitemap_id]
43
+ raise ArgumentError, "Required parameter 'body (url)' missing" unless arguments[:body]
42
44
 
43
- domain_id = arguments[:domain_id]
44
- sitemap_id = arguments[:sitemap_id]
45
+ domain_id = arguments.delete(:domain_id)
46
+ sitemap_id = arguments.delete(:sitemap_id)
45
47
  body = arguments.delete(:body) || {}
46
- headers = arguments.delete(:headers) || {}
47
48
 
49
+ headers = arguments.delete(:headers) || {}
48
50
  request(
49
51
  :put,
50
- "api/as/v0/engines/#{engine_name}/crawler/domains/#{domain_id}/sitemaps/#{sitemap_id}/",
52
+ "api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/sitemaps/#{sitemap_id}/",
51
53
  arguments,
52
54
  body,
53
55
  headers