elastic-enterprise-search 7.17.0 → 8.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/jobs/elastic+enterprise-search-ruby+7.15.yml +12 -0
- data/.ci/jobs/elastic+enterprise-search-ruby+7.16.yml +12 -0
- data/.ci/test-matrix.yml +1 -2
- data/.github/workflows/testing.yml +3 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG +1 -0
- data/CODE_OF_CONDUCT +1 -0
- data/CONTRIBUTING.md +37 -0
- data/NOTICE +2 -0
- data/README.md +25 -29
- data/docs/guide/app-search-api.asciidoc +52 -18
- data/docs/guide/overview.asciidoc +11 -3
- data/docs/guide/release_notes/712.asciidoc +10 -0
- data/docs/guide/release_notes/80.asciidoc +117 -0
- data/docs/guide/release_notes/81.asciidoc +8 -0
- data/docs/guide/release_notes/index.asciidoc +6 -0
- data/docs/guide/workplace-search-api.asciidoc +14 -7
- data/elastic-enterprise-search.gemspec +3 -3
- data/lib/elastic/api/response.rb +52 -0
- data/lib/elastic/{workplace-search/api/user_permissions.rb → app-search/api/adaptive_relevance_settings.rb} +10 -15
- data/lib/elastic/{workplace-search/api/add_user_permissions.rb → app-search/api/adaptive_relevance_suggestions.rb} +19 -14
- data/lib/elastic/app-search/api/add_meta_engine_source.rb +3 -5
- data/lib/elastic/app-search/api/api_key.rb +3 -6
- data/lib/elastic/app-search/api/api_logs.rb +7 -15
- data/lib/elastic/app-search/api/count_analytics.rb +4 -5
- data/lib/elastic/app-search/api/crawler_active_crawl_request.rb +4 -7
- data/lib/elastic/app-search/api/crawler_crawl_request.rb +5 -8
- data/lib/elastic/app-search/api/crawler_crawl_schedule.rb +4 -7
- data/lib/elastic/app-search/api/crawler_domain.rb +5 -8
- data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +5 -5
- data/lib/elastic/app-search/api/crawler_metrics.rb +3 -6
- data/lib/elastic/app-search/api/crawler_overview.rb +4 -7
- data/lib/elastic/app-search/api/crawler_process_crawl.rb +5 -8
- data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +5 -8
- data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +6 -7
- data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +6 -7
- data/lib/elastic/app-search/api/crawler_url_validation_result.rb +6 -7
- data/lib/elastic/app-search/api/crawler_user_agent.rb +3 -6
- data/lib/elastic/app-search/api/create_api_key.rb +9 -10
- data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +9 -5
- data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +12 -11
- data/lib/elastic/app-search/api/create_crawler_domain.rb +7 -8
- data/lib/elastic/app-search/api/create_crawler_entry_point.rb +9 -8
- data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +5 -6
- data/lib/elastic/app-search/api/create_crawler_sitemap.rb +9 -8
- data/lib/elastic/app-search/api/create_curation.rb +9 -8
- data/lib/elastic/app-search/api/create_engine.rb +7 -7
- data/lib/elastic/app-search/api/create_synonym_set.rb +5 -6
- data/lib/elastic/app-search/api/curation.rb +4 -7
- data/lib/elastic/app-search/api/delete_api_key.rb +3 -6
- data/lib/elastic/app-search/api/delete_crawler_active_crawl_request.rb +4 -7
- data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +6 -9
- data/lib/elastic/app-search/api/delete_crawler_crawl_schedule.rb +4 -7
- data/lib/elastic/app-search/api/delete_crawler_domain.rb +5 -8
- data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +6 -9
- data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +6 -9
- data/lib/elastic/app-search/api/delete_curation.rb +4 -7
- data/lib/elastic/app-search/api/delete_documents.rb +3 -5
- data/lib/elastic/app-search/api/delete_engine.rb +3 -6
- data/lib/elastic/app-search/api/delete_meta_engine_source.rb +3 -4
- data/lib/elastic/app-search/api/delete_synonym_set.rb +4 -7
- data/lib/elastic/app-search/api/documents.rb +4 -5
- data/lib/elastic/app-search/api/engine.rb +3 -6
- data/lib/elastic/app-search/api/index_documents.rb +3 -5
- data/lib/elastic/{workplace-search/api/remove_user_permissions.rb → app-search/api/list_adaptive_relevance_suggestions.rb} +12 -14
- data/lib/elastic/app-search/api/list_api_keys.rb +2 -5
- data/lib/elastic/app-search/api/list_crawler_crawl_requests.rb +6 -8
- data/lib/elastic/{workplace-search/api/list_permissions.rb → app-search/api/list_crawler_domains.rb} +12 -13
- data/lib/elastic/app-search/api/list_crawler_process_crawls.rb +6 -7
- data/lib/elastic/app-search/api/list_curations.rb +3 -6
- data/lib/elastic/app-search/api/list_documents.rb +3 -6
- data/lib/elastic/app-search/api/list_engines.rb +2 -5
- data/lib/elastic/app-search/api/list_synonym_sets.rb +3 -6
- data/lib/elastic/app-search/api/log_clickthrough.rb +8 -8
- data/lib/elastic/{workplace-search/api/put_user_permissions.rb → app-search/api/put_adaptive_relevance_settings.rb} +12 -14
- data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +50 -0
- data/lib/elastic/app-search/api/put_api_key.rb +10 -10
- data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +13 -12
- data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +7 -7
- data/lib/elastic/app-search/api/put_crawler_domain.rb +8 -9
- data/lib/elastic/app-search/api/put_crawler_entry_point.rb +10 -9
- data/lib/elastic/app-search/api/put_crawler_sitemap.rb +10 -9
- data/lib/elastic/app-search/api/put_curation.rb +10 -9
- data/lib/elastic/app-search/api/put_documents.rb +3 -4
- data/lib/elastic/app-search/api/put_schema.rb +3 -4
- data/lib/elastic/app-search/api/put_search_settings.rb +5 -6
- data/lib/elastic/app-search/api/put_synonym_set.rb +7 -8
- data/lib/elastic/app-search/api/query_suggestion.rb +4 -5
- data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +55 -0
- data/lib/elastic/app-search/api/reset_search_settings.rb +3 -6
- data/lib/elastic/app-search/api/schema.rb +3 -6
- data/lib/elastic/app-search/api/search.rb +5 -5
- data/lib/elastic/app-search/api/search_settings.rb +3 -6
- data/lib/elastic/app-search/api/synonym_set.rb +4 -7
- data/lib/elastic/app-search/api/top_clicks_analytics.rb +4 -5
- data/lib/elastic/app-search/api/top_queries_analytics.rb +3 -4
- data/lib/elastic/enterprise-search/api/health.rb +2 -3
- data/lib/elastic/enterprise-search/api/put_read_only.rb +5 -4
- data/lib/elastic/enterprise-search/api/read_only.rb +2 -3
- data/lib/elastic/enterprise-search/api/stats.rb +2 -3
- data/lib/elastic/enterprise-search/api/version.rb +2 -3
- data/lib/elastic/enterprise-search/client.rb +8 -13
- data/lib/elastic/enterprise-search/request.rb +5 -3
- data/lib/elastic/enterprise-search/version.rb +1 -1
- data/lib/elastic/workplace-search/api/auto_query_refinement_details.rb +3 -4
- data/lib/elastic/workplace-search/api/command_sync_jobs.rb +4 -5
- data/lib/elastic/workplace-search/api/content_source.rb +3 -4
- data/lib/elastic/workplace-search/api/create_analytics_event.rb +16 -12
- data/lib/elastic/workplace-search/api/create_batch_synonym_sets.rb +4 -3
- data/lib/elastic/workplace-search/api/create_content_source.rb +6 -5
- data/lib/elastic/workplace-search/api/create_external_identity.rb +11 -6
- data/lib/elastic/workplace-search/api/current_user.rb +3 -5
- data/lib/elastic/workplace-search/api/delete_content_source.rb +3 -4
- data/lib/elastic/workplace-search/api/delete_documents.rb +4 -4
- data/lib/elastic/workplace-search/api/delete_documents_by_query.rb +4 -3
- data/lib/elastic/workplace-search/api/delete_external_identity.rb +7 -9
- data/lib/elastic/workplace-search/api/delete_synonym_set.rb +3 -5
- data/lib/elastic/workplace-search/api/document.rb +4 -6
- data/lib/elastic/workplace-search/api/external_identity.rb +7 -9
- data/lib/elastic/workplace-search/api/index_documents.rb +3 -4
- data/lib/elastic/workplace-search/api/list_content_sources.rb +2 -3
- data/lib/elastic/workplace-search/api/list_documents.rb +4 -5
- data/lib/elastic/workplace-search/api/list_external_identities.rb +3 -4
- data/lib/elastic/workplace-search/api/list_synonym_sets.rb +1 -2
- data/lib/elastic/workplace-search/api/put_content_source.rb +6 -6
- data/lib/elastic/workplace-search/api/put_content_source_icons.rb +6 -6
- data/lib/elastic/workplace-search/api/put_external_identity.rb +11 -10
- data/lib/elastic/workplace-search/api/put_synonym_set.rb +4 -4
- data/lib/elastic/workplace-search/api/put_triggers_blocklist.rb +3 -5
- data/lib/elastic/workplace-search/api/search.rb +13 -13
- data/lib/elastic/workplace-search/api/synonym_set.rb +3 -5
- data/lib/elastic/workplace-search/api/triggers_blocklist.rb +3 -3
- data/spec/app-search/client_spec.rb +29 -0
- data/spec/enterprise-search/client_spec.rb +29 -0
- data/spec/enterprise-search/request_spec.rb +1 -1
- data/spec/integration/app-search/adaptive_relevance_settings_spec.rb +60 -0
- data/spec/integration/app-search/adaptive_relevance_suggestions_spec.rb +54 -0
- data/spec/integration/app-search/api_logs_spec.rb +11 -3
- data/spec/integration/app-search/app_search_helper.rb +2 -2
- data/spec/integration/app-search/count_analytics_spec.rb +3 -2
- data/spec/integration/app-search/crawler_domain_spec.rb +16 -0
- data/spec/integration/app-search/curations_spec.rb +15 -9
- data/spec/integration/app-search/engines_spec.rb +24 -26
- data/spec/integration/app-search/log_clickthrough_spec.rb +1 -1
- data/spec/integration/app-search/meta_engines_spec.rb +5 -5
- data/spec/integration/app-search/search_and_multiple_search_spec.rb +1 -1
- data/spec/integration/workplace-search/content_sources_spec.rb +6 -6
- data/spec/integration/workplace-search/documents_spec.rb +20 -10
- data/spec/integration/workplace-search/external_identities_spec.rb +26 -16
- data/spec/integration/workplace-search/triggers_spec.rb +2 -2
- data/spec/integration/workplace-search/users_spec.rb +0 -6
- data/spec/workplace-search/client_spec.rb +29 -0
- metadata +27 -19
- data/.ci/jobs/elastic+enterprise-search-ruby+7.10.0.beta.1.yml +0 -12
- data/.github/compatibility/Gemfile +0 -23
- data/.github/workflows/compatibility.yml +0 -20
- data/spec/integration/workplace-search/permissions_spec.rb +0 -77
@@ -24,25 +24,24 @@ module Elastic
|
|
24
24
|
# Credentials - Create an API key
|
25
25
|
# Creates an App Search API key
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @option arguments [Hash] :body
|
29
|
-
# @option body [
|
30
|
-
# @option body [
|
31
|
-
# @option body [
|
32
|
-
# @option body [
|
27
|
+
# @param [Hash] arguments endpoint arguments
|
28
|
+
# @option arguments [Hash] :body (Required: name, type)
|
29
|
+
# @option body [string] :id
|
30
|
+
# @option body [string] :name
|
31
|
+
# @option body [string] :type
|
32
|
+
# @option body [boolean] :access_all_engines
|
33
33
|
# @option body :engines
|
34
|
-
# @option body [
|
35
|
-
# @option body [
|
34
|
+
# @option body [boolean] :write
|
35
|
+
# @option body [boolean] :read
|
36
36
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
37
37
|
#
|
38
38
|
# @see https://www.elastic.co/guide/en/app-search/current/credentials.html#credentials-create
|
39
39
|
#
|
40
40
|
def create_api_key(arguments = {})
|
41
|
-
raise ArgumentError, "Required parameter 'body' missing" unless arguments[:body]
|
41
|
+
raise ArgumentError, "Required parameter 'body (name,type)' missing" unless arguments[:body]
|
42
42
|
|
43
43
|
body = arguments.delete(:body) || {}
|
44
44
|
headers = arguments.delete(:headers) || {}
|
45
|
-
|
46
45
|
request(
|
47
46
|
:post,
|
48
47
|
'api/as/v1/credentials/',
|
@@ -24,9 +24,14 @@ module Elastic
|
|
24
24
|
# Crawler - Create a crawl request
|
25
25
|
# Creates a request to perform a crawl of a given engine with the Crawler.
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Hash] :body
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Hash] :body
|
30
|
+
# @option body [integer] :max_crawl_depth
|
31
|
+
# @option body [boolean] :sitemap_discovery_disabled
|
32
|
+
# @option body [Array<string>] :domain_allowlist
|
33
|
+
# @option body [Array<string>] :seed_urls
|
34
|
+
# @option body [Array<string>] :sitemap_urls
|
30
35
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
31
36
|
#
|
32
37
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-crawl-requests
|
@@ -36,10 +41,9 @@ module Elastic
|
|
36
41
|
|
37
42
|
body = arguments.delete(:body) || {}
|
38
43
|
headers = arguments.delete(:headers) || {}
|
39
|
-
|
40
44
|
request(
|
41
45
|
:post,
|
42
|
-
"api/as/
|
46
|
+
"api/as/v1/engines/#{engine_name}/crawler/crawl_requests/",
|
43
47
|
arguments,
|
44
48
|
body,
|
45
49
|
headers
|
@@ -24,15 +24,16 @@ module Elastic
|
|
24
24
|
# Crawler - Create a crawl rule
|
25
25
|
# Creates a crawl rule for a given engine and domain
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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
|
-
# @option arguments [Hash] :body
|
31
|
-
# @option body [
|
32
|
-
# @option body [
|
33
|
-
# @option body [
|
34
|
-
# @option body [
|
35
|
-
# @option body [
|
30
|
+
# @option arguments [Hash] :body (Required: order, policy, rule, pattern)
|
31
|
+
# @option body [string] :id
|
32
|
+
# @option body [integer] :order
|
33
|
+
# @option body [string] :policy
|
34
|
+
# @option body [string] :rule
|
35
|
+
# @option body [string] :pattern
|
36
|
+
# @option body [string] :created_at
|
36
37
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
37
38
|
#
|
38
39
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawl-rules
|
@@ -40,14 +41,14 @@ module Elastic
|
|
40
41
|
def create_crawler_crawl_rule(engine_name, arguments = {})
|
41
42
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
42
43
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
44
|
+
raise ArgumentError, "Required parameter 'body (order,policy,rule,pattern)' missing" unless arguments[:body]
|
43
45
|
|
44
|
-
domain_id = arguments
|
46
|
+
domain_id = arguments.delete(:domain_id)
|
45
47
|
body = arguments.delete(:body) || {}
|
46
48
|
headers = arguments.delete(:headers) || {}
|
47
|
-
|
48
49
|
request(
|
49
50
|
:post,
|
50
|
-
"api/as/
|
51
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/crawl_rules/",
|
51
52
|
arguments,
|
52
53
|
body,
|
53
54
|
headers
|
@@ -24,13 +24,13 @@ module Elastic
|
|
24
24
|
# Crawler - Create a crawler domain
|
25
25
|
# Creates a crawler domain configuration for a given engine
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
29
|
# @option arguments [Hash] :body
|
30
|
-
# @option body [
|
31
|
-
# @option body [Array] :entry_points
|
32
|
-
# @option body [Array] :crawl_rules
|
33
|
-
# @option body [Array] :sitemaps
|
30
|
+
# @option body [string] :name
|
31
|
+
# @option body [Array<object>] :entry_points
|
32
|
+
# @option body [Array<object>] :crawl_rules
|
33
|
+
# @option body [Array<object>] :sitemaps
|
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/web-crawler-api-reference.html#web-crawler-apis-post-crawler-domains
|
@@ -40,10 +40,9 @@ module Elastic
|
|
40
40
|
|
41
41
|
body = arguments.delete(:body) || {}
|
42
42
|
headers = arguments.delete(:headers) || {}
|
43
|
-
|
44
43
|
request(
|
45
44
|
:post,
|
46
|
-
"api/as/
|
45
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/",
|
47
46
|
arguments,
|
48
47
|
body,
|
49
48
|
headers
|
@@ -24,12 +24,13 @@ module Elastic
|
|
24
24
|
# Crawler - Create a crawler entry point
|
25
25
|
# Creates a crawler domain entry point for a given engine and domain
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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
|
-
# @option arguments [Hash] :body
|
31
|
-
# @option body [
|
32
|
-
# @option body [
|
30
|
+
# @option arguments [Hash] :body (Required: value)
|
31
|
+
# @option body [string] :id
|
32
|
+
# @option body [string] :value
|
33
|
+
# @option body [string] :created_at
|
33
34
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
34
35
|
#
|
35
36
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-entry-points
|
@@ -37,14 +38,14 @@ module Elastic
|
|
37
38
|
def create_crawler_entry_point(engine_name, arguments = {})
|
38
39
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
39
40
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
41
|
+
raise ArgumentError, "Required parameter 'body (value)' missing" unless arguments[:body]
|
40
42
|
|
41
|
-
domain_id = arguments
|
43
|
+
domain_id = arguments.delete(:domain_id)
|
42
44
|
body = arguments.delete(:body) || {}
|
43
45
|
headers = arguments.delete(:headers) || {}
|
44
|
-
|
45
46
|
request(
|
46
47
|
:post,
|
47
|
-
"api/as/
|
48
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/entry_points/",
|
48
49
|
arguments,
|
49
50
|
body,
|
50
51
|
headers
|
@@ -24,11 +24,11 @@ module Elastic
|
|
24
24
|
# Crawler - Create a process crawl
|
25
25
|
# Queues a task to reprocess crawled documents with current crawl configuration
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
29
|
# @option arguments [Hash] :body
|
30
|
-
# @option body [
|
31
|
-
# @option body [Array] :domains
|
30
|
+
# @option body [boolean] :dry_run
|
31
|
+
# @option body [Array<string>] :domains
|
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-post-crawler-process-crawls
|
@@ -38,10 +38,9 @@ module Elastic
|
|
38
38
|
|
39
39
|
body = arguments.delete(:body) || {}
|
40
40
|
headers = arguments.delete(:headers) || {}
|
41
|
-
|
42
41
|
request(
|
43
42
|
:post,
|
44
|
-
"api/as/
|
43
|
+
"api/as/v1/engines/#{engine_name}/crawler/process_crawls/",
|
45
44
|
arguments,
|
46
45
|
body,
|
47
46
|
headers
|
@@ -24,12 +24,13 @@ module Elastic
|
|
24
24
|
# Crawler - Create a crawler sitemap
|
25
25
|
# Creates a crawler sitemap configuration for a given engine and domain
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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
|
-
# @option arguments [Hash] :body
|
31
|
-
# @option body [
|
32
|
-
# @option body
|
30
|
+
# @option arguments [Hash] :body (Required: url)
|
31
|
+
# @option body [string] :id
|
32
|
+
# @option body :url
|
33
|
+
# @option body [string] :created_at
|
33
34
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
34
35
|
#
|
35
36
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-sitemaps
|
@@ -37,14 +38,14 @@ module Elastic
|
|
37
38
|
def create_crawler_sitemap(engine_name, arguments = {})
|
38
39
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
39
40
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
41
|
+
raise ArgumentError, "Required parameter 'body (url)' missing" unless arguments[:body]
|
40
42
|
|
41
|
-
domain_id = arguments
|
43
|
+
domain_id = arguments.delete(:domain_id)
|
42
44
|
body = arguments.delete(:body) || {}
|
43
45
|
headers = arguments.delete(:headers) || {}
|
44
|
-
|
45
46
|
request(
|
46
47
|
:post,
|
47
|
-
"api/as/
|
48
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/sitemaps/",
|
48
49
|
arguments,
|
49
50
|
body,
|
50
51
|
headers
|
@@ -24,23 +24,24 @@ module Elastic
|
|
24
24
|
# Curations - Create a new curation
|
25
25
|
# Create a new curation for the engine
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Hash] :body
|
30
|
-
# @option body [
|
31
|
-
# @option body [Array] :queries List of affected search queries
|
32
|
-
# @option body [Array] :promoted List of promoted document IDs
|
33
|
-
# @option body [Array] :hidden List of hidden document IDs
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Hash] :body (Required: queries)
|
30
|
+
# @option body [string] :id
|
31
|
+
# @option body [Array<string>] :queries List of affected search queries
|
32
|
+
# @option body [Array<string>] :promoted List of promoted document IDs
|
33
|
+
# @option body [Array<string>] :hidden List of hidden document IDs
|
34
|
+
# @option body [Hash] :suggestion
|
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/curations.html#curations-create
|
37
38
|
#
|
38
39
|
def create_curation(engine_name, arguments = {})
|
39
40
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
41
|
+
raise ArgumentError, "Required parameter 'body (queries)' missing" unless arguments[:body]
|
40
42
|
|
41
43
|
body = arguments.delete(:body) || {}
|
42
44
|
headers = arguments.delete(:headers) || {}
|
43
|
-
|
44
45
|
request(
|
45
46
|
:post,
|
46
47
|
"api/as/v1/engines/#{engine_name}/curations/",
|
@@ -24,23 +24,23 @@ module Elastic
|
|
24
24
|
# Engines - Create an Engine
|
25
25
|
# Creates an App Search Engine
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @option arguments [Hash] :body
|
29
|
-
# @option body :name
|
30
|
-
# @option body [
|
27
|
+
# @param [Hash] arguments endpoint arguments
|
28
|
+
# @option arguments [Hash] :body (Required: name)
|
29
|
+
# @option body :name
|
30
|
+
# @option body [string] :language Engine language (null for universal)
|
31
31
|
# @option body :type
|
32
32
|
# @option body :source_engines
|
33
|
-
# @option body [
|
33
|
+
# @option body [integer] :document_count
|
34
|
+
# @option body :index_create_settings_override
|
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/engines.html#engines-create
|
37
38
|
#
|
38
39
|
def create_engine(arguments = {})
|
39
|
-
raise ArgumentError, "Required parameter 'body (name)' missing" unless arguments[:body]
|
40
|
+
raise ArgumentError, "Required parameter 'body (name)' missing" unless arguments[:body]
|
40
41
|
|
41
42
|
body = arguments.delete(:body) || {}
|
42
43
|
headers = arguments.delete(:headers) || {}
|
43
|
-
|
44
44
|
request(
|
45
45
|
:post,
|
46
46
|
'api/as/v1/engines/',
|
@@ -24,11 +24,11 @@ module Elastic
|
|
24
24
|
# Synonyms - Create a synonym set
|
25
25
|
# Creates a new synonym set for the engine
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Hash] :body
|
30
|
-
# @option body [
|
31
|
-
# @option body :synonyms
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Hash] :body (Required: synonyms)
|
30
|
+
# @option body [string] :id
|
31
|
+
# @option body :synonyms
|
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/synonyms.html#synonyms-create
|
@@ -39,7 +39,6 @@ module Elastic
|
|
39
39
|
|
40
40
|
body = arguments.delete(:body) || {}
|
41
41
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
42
|
request(
|
44
43
|
:post,
|
45
44
|
"api/as/v1/engines/#{engine_name}/synonyms/",
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Curations - Retrieve a curation
|
25
25
|
# Retrieves a curation by ID
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
29
|
# @option arguments [String] :curation_id Curation ID (*Required*)
|
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/curations.html#curations-read
|
@@ -36,15 +35,13 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'curation_id' missing" unless arguments[:curation_id]
|
38
37
|
|
39
|
-
curation_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
38
|
+
curation_id = arguments.delete(:curation_id)
|
41
39
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
40
|
request(
|
44
41
|
:get,
|
45
42
|
"api/as/v1/engines/#{engine_name}/curations/#{curation_id}/",
|
46
43
|
arguments,
|
47
|
-
|
44
|
+
nil,
|
48
45
|
headers
|
49
46
|
)
|
50
47
|
end
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Credentials - Delete an API key
|
25
25
|
# Deletes a given API key
|
26
26
|
#
|
27
|
-
# @param
|
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 The request body
|
30
29
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
31
30
|
#
|
32
31
|
# @see https://www.elastic.co/guide/en/app-search/current/credentials.html#credentials-destroy
|
@@ -34,15 +33,13 @@ module Elastic
|
|
34
33
|
def delete_api_key(arguments = {})
|
35
34
|
raise ArgumentError, "Required parameter 'api_key_name' missing" unless arguments[:api_key_name]
|
36
35
|
|
37
|
-
api_key_name = arguments
|
38
|
-
body = arguments.delete(:body) || {}
|
36
|
+
api_key_name = arguments.delete(:api_key_name)
|
39
37
|
headers = arguments.delete(:headers) || {}
|
40
|
-
|
41
38
|
request(
|
42
39
|
:delete,
|
43
40
|
"api/as/v1/credentials/#{api_key_name}/",
|
44
41
|
arguments,
|
45
|
-
|
42
|
+
nil,
|
46
43
|
headers
|
47
44
|
)
|
48
45
|
end
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Crawler - Cancel an active crawl request
|
25
25
|
# Cancels an active crawl request, stopping a running crawl if needed.
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Hash] :body The request body
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
30
29
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
31
30
|
#
|
32
31
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-crawl-requests-active-cancel
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def delete_crawler_active_crawl_request(engine_name, arguments = {})
|
35
34
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
35
|
|
37
|
-
body = arguments.delete(:body) || {}
|
38
36
|
headers = arguments.delete(:headers) || {}
|
39
|
-
|
40
37
|
request(
|
41
38
|
:post,
|
42
|
-
"api/as/
|
39
|
+
"api/as/v1/engines/#{engine_name}/crawler/crawl_requests/active/cancel/",
|
43
40
|
arguments,
|
44
|
-
|
41
|
+
nil,
|
45
42
|
headers
|
46
43
|
)
|
47
44
|
end
|
@@ -24,11 +24,10 @@ module Elastic
|
|
24
24
|
# Crawler - Delete a crawl rule
|
25
25
|
# Deletes a crawl rule from a given domain
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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 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/web-crawler-api-reference.html#web-crawler-apis-delete-crawl-rule
|
@@ -38,16 +37,14 @@ module Elastic
|
|
38
37
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
39
38
|
raise ArgumentError, "Required parameter 'crawl_rule_id' missing" unless arguments[:crawl_rule_id]
|
40
39
|
|
41
|
-
domain_id = arguments
|
42
|
-
crawl_rule_id = arguments
|
43
|
-
body = arguments.delete(:body) || {}
|
40
|
+
domain_id = arguments.delete(:domain_id)
|
41
|
+
crawl_rule_id = arguments.delete(:crawl_rule_id)
|
44
42
|
headers = arguments.delete(:headers) || {}
|
45
|
-
|
46
43
|
request(
|
47
44
|
:delete,
|
48
|
-
"api/as/
|
45
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/crawl_rules/#{crawl_rule_id}/",
|
49
46
|
arguments,
|
50
|
-
|
47
|
+
nil,
|
51
48
|
headers
|
52
49
|
)
|
53
50
|
end
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Crawler - Delete a crawl schedule
|
25
25
|
# Deletes a crawl schedule for a given engine
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Hash] :body The request body
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
30
29
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
31
30
|
#
|
32
31
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-delete-crawler-crawl-schedule
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def delete_crawler_crawl_schedule(engine_name, arguments = {})
|
35
34
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
35
|
|
37
|
-
body = arguments.delete(:body) || {}
|
38
36
|
headers = arguments.delete(:headers) || {}
|
39
|
-
|
40
37
|
request(
|
41
38
|
:delete,
|
42
|
-
"api/as/
|
39
|
+
"api/as/v1/engines/#{engine_name}/crawler/crawl_schedule/",
|
43
40
|
arguments,
|
44
|
-
|
41
|
+
nil,
|
45
42
|
headers
|
46
43
|
)
|
47
44
|
end
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Crawler - Delete domain configuration
|
25
25
|
# Deletes crawler domain configuration for a given domain
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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
|
-
# @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/web-crawler-api-reference.html#web-crawler-apis-delete-crawler-domain
|
@@ -36,15 +35,13 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
38
37
|
|
39
|
-
domain_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
38
|
+
domain_id = arguments.delete(:domain_id)
|
41
39
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
40
|
request(
|
44
41
|
:delete,
|
45
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/",
|
46
43
|
arguments,
|
47
|
-
|
44
|
+
nil,
|
48
45
|
headers
|
49
46
|
)
|
50
47
|
end
|
@@ -24,11 +24,10 @@ module Elastic
|
|
24
24
|
# Crawler - Delete an entry point
|
25
25
|
# Deletes a crawler entry point
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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 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/web-crawler-api-reference.html#web-crawler-apis-delete-crawler-domain
|
@@ -38,16 +37,14 @@ module Elastic
|
|
38
37
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
39
38
|
raise ArgumentError, "Required parameter 'entry_point_id' missing" unless arguments[:entry_point_id]
|
40
39
|
|
41
|
-
domain_id = arguments
|
42
|
-
entry_point_id = arguments
|
43
|
-
body = arguments.delete(:body) || {}
|
40
|
+
domain_id = arguments.delete(:domain_id)
|
41
|
+
entry_point_id = arguments.delete(:entry_point_id)
|
44
42
|
headers = arguments.delete(:headers) || {}
|
45
|
-
|
46
43
|
request(
|
47
44
|
:delete,
|
48
|
-
"api/as/
|
45
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/entry_points/#{entry_point_id}/",
|
49
46
|
arguments,
|
50
|
-
|
47
|
+
nil,
|
51
48
|
headers
|
52
49
|
)
|
53
50
|
end
|
@@ -24,11 +24,10 @@ module Elastic
|
|
24
24
|
# Crawler - Delete a sitemap
|
25
25
|
# Deletes a sitemap from a given domain
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
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 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/web-crawler-api-reference.html#web-crawler-apis-delete-sitemap
|
@@ -38,16 +37,14 @@ module Elastic
|
|
38
37
|
raise ArgumentError, "Required parameter 'domain_id' missing" unless arguments[:domain_id]
|
39
38
|
raise ArgumentError, "Required parameter 'sitemap_id' missing" unless arguments[:sitemap_id]
|
40
39
|
|
41
|
-
domain_id = arguments
|
42
|
-
sitemap_id = arguments
|
43
|
-
body = arguments.delete(:body) || {}
|
40
|
+
domain_id = arguments.delete(:domain_id)
|
41
|
+
sitemap_id = arguments.delete(:sitemap_id)
|
44
42
|
headers = arguments.delete(:headers) || {}
|
45
|
-
|
46
43
|
request(
|
47
44
|
:delete,
|
48
|
-
"api/as/
|
45
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/sitemaps/#{sitemap_id}/",
|
49
46
|
arguments,
|
50
|
-
|
47
|
+
nil,
|
51
48
|
headers
|
52
49
|
)
|
53
50
|
end
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Curations - Delete a curation
|
25
25
|
# Deletes a curation set by ID
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
29
|
# @option arguments [String] :curation_id Curation ID (*Required*)
|
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/curations.html#curations-destroy
|
@@ -36,15 +35,13 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'curation_id' missing" unless arguments[:curation_id]
|
38
37
|
|
39
|
-
curation_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
38
|
+
curation_id = arguments.delete(:curation_id)
|
41
39
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
40
|
request(
|
44
41
|
:delete,
|
45
42
|
"api/as/v1/engines/#{engine_name}/curations/#{curation_id}/",
|
46
43
|
arguments,
|
47
|
-
|
44
|
+
nil,
|
48
45
|
headers
|
49
46
|
)
|
50
47
|
end
|