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
@@ -19,31 +19,26 @@
|
|
19
19
|
|
20
20
|
module Elastic
|
21
21
|
module EnterpriseSearch
|
22
|
-
module
|
22
|
+
module AppSearch
|
23
23
|
module Actions
|
24
|
-
#
|
25
|
-
#
|
24
|
+
# AdaptiveRelevanceSettings - Retrieve adaptive relevance settings
|
25
|
+
# Retrieve adaptive relevance settings
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [String] :user The username in context (*Required*)
|
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
|
-
# @see https://www.elastic.co/guide/en/
|
31
|
+
# @see https://www.elastic.co/guide/en/app-search/current/adaptive-relevance-api-reference.html#adaptive-relevance-api-get-engine-adaptive-relevance-settings
|
33
32
|
#
|
34
|
-
def
|
35
|
-
raise ArgumentError, "Required parameter '
|
36
|
-
raise ArgumentError, "Required parameter 'user' missing" unless arguments[:user]
|
37
|
-
|
38
|
-
user = arguments[:user]
|
33
|
+
def adaptive_relevance_settings(engine_name, arguments = {})
|
34
|
+
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
39
35
|
|
40
36
|
headers = arguments.delete(:headers) || {}
|
41
|
-
|
42
37
|
request(
|
43
38
|
:get,
|
44
|
-
"api/
|
39
|
+
"api/as/v0/engines/#{engine_name}/adaptive_relevance/settings/",
|
45
40
|
arguments,
|
46
|
-
|
41
|
+
nil,
|
47
42
|
headers
|
48
43
|
)
|
49
44
|
end
|
@@ -19,30 +19,35 @@
|
|
19
19
|
|
20
20
|
module Elastic
|
21
21
|
module EnterpriseSearch
|
22
|
-
module
|
22
|
+
module AppSearch
|
23
23
|
module Actions
|
24
|
-
#
|
25
|
-
#
|
24
|
+
# AdaptiveRelevanceSuggestions - Retrieve adaptive relevance
|
25
|
+
# Retrieve adaptive relevance for a single query
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [String] :
|
30
|
-
# @option arguments [
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments 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 [string] :filters
|
31
33
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
32
34
|
#
|
33
|
-
# @see https://www.elastic.co/guide/en/
|
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
|
34
36
|
#
|
35
|
-
def
|
36
|
-
raise ArgumentError, "Required parameter '
|
37
|
-
raise ArgumentError, "Required parameter 'user' missing" unless arguments[:user]
|
37
|
+
def adaptive_relevance_suggestions(engine_name, arguments = {})
|
38
|
+
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
38
39
|
|
39
|
-
|
40
|
+
unless arguments[:search_suggestion_query]
|
41
|
+
raise ArgumentError,
|
42
|
+
"Required parameter 'search_suggestion_query' missing"
|
43
|
+
end
|
44
|
+
|
45
|
+
search_suggestion_query = arguments.delete(:search_suggestion_query)
|
40
46
|
body = arguments.delete(:body) || {}
|
41
47
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
48
|
request(
|
44
49
|
:post,
|
45
|
-
"api/
|
50
|
+
"api/as/v0/engines/#{engine_name}/adaptive_relevance/suggestions/#{search_suggestion_query}/",
|
46
51
|
arguments,
|
47
52
|
body,
|
48
53
|
headers
|
@@ -24,20 +24,18 @@ module Elastic
|
|
24
24
|
# Engines - Add a source engine
|
25
25
|
# Adds a source engine to a given meta engine
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Array] :source_engines
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Array<String>] :source_engines
|
30
30
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
31
31
|
#
|
32
32
|
# @see https://www.elastic.co/guide/en/app-search/current/meta-engines.html#meta-engines-add-source-engines
|
33
33
|
#
|
34
34
|
def add_meta_engine_source(engine_name, arguments = {})
|
35
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
|
-
raise ArgumentError, "Required parameter 'source_engines' missing" unless arguments[:source_engines]
|
37
36
|
|
38
37
|
source_engines = arguments.delete(:source_engines) || {}
|
39
38
|
headers = arguments.delete(:headers) || {}
|
40
|
-
|
41
39
|
request(
|
42
40
|
:post,
|
43
41
|
"api/as/v1/engines/#{engine_name}/source_engines/",
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Credentials - Retrieve an API key
|
25
25
|
# Retrieves details of an 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-single
|
@@ -34,15 +33,13 @@ module Elastic
|
|
34
33
|
def 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
|
:get,
|
43
40
|
"api/as/v1/credentials/#{api_key_name}/",
|
44
41
|
arguments,
|
45
|
-
|
42
|
+
nil,
|
46
43
|
headers
|
47
44
|
)
|
48
45
|
end
|
@@ -24,31 +24,23 @@ module Elastic
|
|
24
24
|
# APILogs - Retrieve API logs
|
25
25
|
# The API Log displays API request and response data at the Engine level
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [
|
30
|
-
# @option arguments [Date] :to_date Filter date to (*Required*)
|
31
|
-
# @option arguments [Hash] :body
|
32
|
-
# @option body [String] :query You can search over the full_request_path of an API Log event. Use this to specify a particular endpoint, like analytics, search, curations and so on.
|
33
|
-
# @option body [String] :sort_direction Would you like to have your results ascending, oldest to newest, or descending, newest to oldest? Accepts asc or desc. Defaults to ascending.
|
34
|
-
# @option body [Integer] :page current for current page, total_pages for the net number of pages, total_results for the overall number of results, size for the amount of results per page.
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Hash] :body (Required: filters)
|
35
30
|
# @option body :filters
|
36
|
-
# @option
|
37
|
-
# @option
|
31
|
+
# @option body :page
|
32
|
+
# @option body [string] :query
|
33
|
+
# @option body :sort_direction
|
38
34
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
39
35
|
#
|
40
36
|
# @see https://www.elastic.co/guide/en/app-search/current/api-logs.html
|
41
37
|
#
|
42
38
|
def api_logs(engine_name, arguments = {})
|
43
39
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
44
|
-
raise ArgumentError, "Required parameter '
|
45
|
-
raise ArgumentError, "Required parameter 'to_date' missing" unless arguments[:to_date]
|
40
|
+
raise ArgumentError, "Required parameter 'body (filters)' missing" unless arguments[:body]
|
46
41
|
|
47
42
|
body = arguments.delete(:body) || {}
|
48
43
|
headers = arguments.delete(:headers) || {}
|
49
|
-
arguments['filters[date][from]'] = date_to_rfc3339(arguments.delete(:from_date))
|
50
|
-
arguments['filters[date][to]'] = date_to_rfc3339(arguments.delete(:to_date))
|
51
|
-
|
52
44
|
request(
|
53
45
|
:post,
|
54
46
|
"api/as/v1/engines/#{engine_name}/logs/api/",
|
@@ -24,11 +24,11 @@ module Elastic
|
|
24
24
|
# Analytics - Query for analytics counts data
|
25
25
|
# Returns the number of clicks and total number of queries over a period
|
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 :filters
|
31
|
-
# @option body [
|
30
|
+
# @option body :filters
|
31
|
+
# @option body [string] :interval
|
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/counts.html
|
@@ -38,7 +38,6 @@ module Elastic
|
|
38
38
|
|
39
39
|
body = arguments.delete(:body) || {}
|
40
40
|
headers = arguments.delete(:headers) || {}
|
41
|
-
|
42
41
|
request(
|
43
42
|
:post,
|
44
43
|
"api/as/v1/engines/#{engine_name}/analytics/counts/",
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Crawler - Get active crawl request details
|
25
25
|
# Returns active crawl request details.
|
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-get-crawler-crawl-requests-active
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def 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
|
:get,
|
42
|
-
"api/as/
|
39
|
+
"api/as/v1/engines/#{engine_name}/crawler/crawl_requests/active/",
|
43
40
|
arguments,
|
44
|
-
|
41
|
+
nil,
|
45
42
|
headers
|
46
43
|
)
|
47
44
|
end
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Crawler - Get crawl request details
|
25
25
|
# Returns crawl request details.
|
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] :crawl_request_id Crawl Request 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-get-crawler-crawl-requests-id
|
@@ -36,15 +35,13 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'crawl_request_id' missing" unless arguments[:crawl_request_id]
|
38
37
|
|
39
|
-
crawl_request_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
38
|
+
crawl_request_id = arguments.delete(:crawl_request_id)
|
41
39
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
40
|
request(
|
44
41
|
:get,
|
45
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/crawl_requests/#{crawl_request_id}/",
|
46
43
|
arguments,
|
47
|
-
|
44
|
+
nil,
|
48
45
|
headers
|
49
46
|
)
|
50
47
|
end
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Crawler - Get crawl schedule
|
25
25
|
# Returns the current 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-get-crawler-crawl-schedule
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def 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
|
:get,
|
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 - Get domain configuration
|
25
25
|
# Returns crawler domain configuration details
|
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-get-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
|
:get,
|
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,19 +24,19 @@ module Elastic
|
|
24
24
|
# Crawler - Validate Domain with Crawler
|
25
25
|
# Performs a number of checks on a given domain name to make sure it is ready to be crawled and ingested into App Search.
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @option arguments [
|
27
|
+
# @param [Hash] arguments endpoint arguments
|
28
|
+
# @option arguments [string] :body
|
29
|
+
# @option body [string] :url *Required*
|
29
30
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
30
31
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html
|
32
|
+
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-validate-domain
|
32
33
|
#
|
33
34
|
def crawler_domain_validation_result(arguments = {})
|
34
35
|
body = arguments.delete(:body) || {}
|
35
36
|
headers = arguments.delete(:headers) || {}
|
36
|
-
|
37
37
|
request(
|
38
38
|
:post,
|
39
|
-
'api/as/
|
39
|
+
'api/as/v1/crawler/validate_url/',
|
40
40
|
arguments,
|
41
41
|
body,
|
42
42
|
headers
|
@@ -24,21 +24,18 @@ module Elastic
|
|
24
24
|
# Crawler - Retrieve a snapshot of crawler metrics
|
25
25
|
# Retrieves a momentary snapshot of key crawler metrics, including global and node-level crawler health
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @option arguments [Hash] :body The request body
|
27
|
+
# @param [Hash] arguments endpoint arguments
|
29
28
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
30
29
|
#
|
31
30
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html
|
32
31
|
#
|
33
32
|
def crawler_metrics(arguments = {})
|
34
|
-
body = arguments.delete(:body) || {}
|
35
33
|
headers = arguments.delete(:headers) || {}
|
36
|
-
|
37
34
|
request(
|
38
35
|
:get,
|
39
|
-
'api/as/
|
36
|
+
'api/as/v1/crawler/metrics/',
|
40
37
|
arguments,
|
41
|
-
|
38
|
+
nil,
|
42
39
|
headers
|
43
40
|
)
|
44
41
|
end
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Crawler - Retrieve crawler configuration overview
|
25
25
|
# Retrieves crawler configuration overview of a given engine, including configured domains
|
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-get-crawler
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def crawler_overview(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
|
:get,
|
42
|
-
"api/as/
|
39
|
+
"api/as/v1/engines/#{engine_name}/crawler/",
|
43
40
|
arguments,
|
44
|
-
|
41
|
+
nil,
|
45
42
|
headers
|
46
43
|
)
|
47
44
|
end
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Crawler - Get process crawl details
|
25
25
|
# Returns process crawl details.
|
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] :process_crawl_id Process Crawl identifier (*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-get-crawler-process-crawls-id
|
@@ -36,15 +35,13 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'process_crawl_id' missing" unless arguments[:process_crawl_id]
|
38
37
|
|
39
|
-
process_crawl_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
38
|
+
process_crawl_id = arguments.delete(:process_crawl_id)
|
41
39
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
40
|
request(
|
44
41
|
:get,
|
45
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/process_crawls/#{process_crawl_id}/",
|
46
43
|
arguments,
|
47
|
-
|
44
|
+
nil,
|
48
45
|
headers
|
49
46
|
)
|
50
47
|
end
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Crawler - View denied urls for Process Crawl
|
25
25
|
# Provides a sample list of urls identified for deletion by the given process crawl 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] :process_crawl_id Process Crawl identifier (*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-get-crawler-process-crawls-id-denied-urls
|
@@ -36,15 +35,13 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'process_crawl_id' missing" unless arguments[:process_crawl_id]
|
38
37
|
|
39
|
-
process_crawl_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
38
|
+
process_crawl_id = arguments.delete(:process_crawl_id)
|
41
39
|
headers = arguments.delete(:headers) || {}
|
42
|
-
|
43
40
|
request(
|
44
41
|
:get,
|
45
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/process_crawls/#{process_crawl_id}/denied_urls/",
|
46
43
|
arguments,
|
47
|
-
|
44
|
+
nil,
|
48
45
|
headers
|
49
46
|
)
|
50
47
|
end
|
@@ -24,23 +24,22 @@ module Elastic
|
|
24
24
|
# Crawler - Extract content from a URL
|
25
25
|
# Performs an HTTP request to a given URL and extracts content from the page using standard App Search Crawler extraction pipeline.
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [
|
30
|
-
# @option
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [string] :body
|
30
|
+
# @option body [string] :url *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/app-search/current/web-crawler-api-reference.html
|
33
|
+
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-extract-url
|
34
34
|
#
|
35
35
|
def crawler_url_extraction_result(engine_name, arguments = {})
|
36
36
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
37
|
|
38
38
|
body = arguments.delete(:body) || {}
|
39
39
|
headers = arguments.delete(:headers) || {}
|
40
|
-
|
41
40
|
request(
|
42
41
|
:post,
|
43
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/extract_url/",
|
44
43
|
arguments,
|
45
44
|
body,
|
46
45
|
headers
|
@@ -24,23 +24,22 @@ module Elastic
|
|
24
24
|
# Crawler - Trace a history of a crawled URL
|
25
25
|
# Returns information about the history of a given URL with the App Search Crawler.
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [
|
30
|
-
# @option
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [string] :body
|
30
|
+
# @option body [string] :url *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/app-search/current/web-crawler-api-reference.html
|
33
|
+
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-trace-url
|
34
34
|
#
|
35
35
|
def crawler_url_tracing_result(engine_name, arguments = {})
|
36
36
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
37
|
|
38
38
|
body = arguments.delete(:body) || {}
|
39
39
|
headers = arguments.delete(:headers) || {}
|
40
|
-
|
41
40
|
request(
|
42
41
|
:post,
|
43
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/trace_url/",
|
44
43
|
arguments,
|
45
44
|
body,
|
46
45
|
headers
|
@@ -24,23 +24,22 @@ module Elastic
|
|
24
24
|
# Crawler - Validate URL with Crawler
|
25
25
|
# Performs a number of checks on a given URL to make sure it is ready to be crawled and ingested into App Search.
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [
|
30
|
-
# @option
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [string] :body
|
30
|
+
# @option body [string] :url *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/app-search/current/web-crawler-api-reference.html
|
33
|
+
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-post-crawler-validate-url
|
34
34
|
#
|
35
35
|
def crawler_url_validation_result(engine_name, arguments = {})
|
36
36
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
37
|
|
38
38
|
body = arguments.delete(:body) || {}
|
39
39
|
headers = arguments.delete(:headers) || {}
|
40
|
-
|
41
40
|
request(
|
42
41
|
:post,
|
43
|
-
"api/as/
|
42
|
+
"api/as/v1/engines/#{engine_name}/crawler/validate_url/",
|
44
43
|
arguments,
|
45
44
|
body,
|
46
45
|
headers
|
@@ -24,21 +24,18 @@ module Elastic
|
|
24
24
|
# Crawler - Get the User-Agent header value for the crawler
|
25
25
|
# Retrieves the currently configured value for the User-Agent header used for all Crawler HTTP requests
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @option arguments [Hash] :body The request body
|
27
|
+
# @param [Hash] arguments endpoint arguments
|
29
28
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
30
29
|
#
|
31
30
|
# @see https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html#web-crawler-apis-user-agent
|
32
31
|
#
|
33
32
|
def crawler_user_agent(arguments = {})
|
34
|
-
body = arguments.delete(:body) || {}
|
35
33
|
headers = arguments.delete(:headers) || {}
|
36
|
-
|
37
34
|
request(
|
38
35
|
:get,
|
39
|
-
'api/as/
|
36
|
+
'api/as/v1/crawler/user_agent/',
|
40
37
|
arguments,
|
41
|
-
|
38
|
+
nil,
|
42
39
|
headers
|
43
40
|
)
|
44
41
|
end
|