elastic-enterprise-search 7.17.0 → 8.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/jobs/elastic+enterprise-search-ruby+7.13.yml +12 -0
- data/.ci/jobs/elastic+enterprise-search-ruby+7.14.yml +12 -0
- 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 -3
- 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/connecting.asciidoc +0 -1
- data/docs/guide/overview.asciidoc +27 -4
- data/docs/guide/release_notes/712.asciidoc +10 -0
- data/docs/guide/release_notes/714.asciidoc +0 -12
- data/docs/guide/release_notes/715.asciidoc +0 -12
- data/docs/guide/release_notes/80.asciidoc +128 -0
- data/docs/guide/release_notes/index.asciidoc +4 -0
- data/docs/guide/workplace-search-api.asciidoc +38 -11
- 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} +20 -14
- data/lib/elastic/app-search/api/add_meta_engine_source.rb +4 -5
- data/lib/elastic/app-search/api/api_key.rb +4 -6
- data/lib/elastic/app-search/api/api_logs.rb +8 -15
- data/lib/elastic/app-search/api/count_analytics.rb +5 -5
- data/lib/elastic/app-search/api/crawler_active_crawl_request.rb +4 -7
- data/lib/elastic/app-search/api/crawler_crawl_request.rb +6 -8
- data/lib/elastic/app-search/api/crawler_crawl_schedule.rb +4 -7
- data/lib/elastic/app-search/api/crawler_domain.rb +6 -8
- data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +6 -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 +6 -8
- data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +6 -8
- data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +6 -6
- data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +7 -7
- data/lib/elastic/app-search/api/crawler_url_validation_result.rb +7 -7
- data/lib/elastic/app-search/api/crawler_user_agent.rb +3 -6
- data/lib/elastic/app-search/api/create_api_key.rb +10 -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 +13 -11
- data/lib/elastic/app-search/api/create_crawler_domain.rb +8 -8
- data/lib/elastic/app-search/api/create_crawler_entry_point.rb +10 -8
- data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +6 -6
- data/lib/elastic/app-search/api/create_crawler_sitemap.rb +10 -8
- data/lib/elastic/app-search/api/create_curation.rb +10 -8
- data/lib/elastic/app-search/api/create_engine.rb +8 -7
- data/lib/elastic/app-search/api/create_synonym_set.rb +6 -6
- data/lib/elastic/app-search/api/curation.rb +5 -7
- data/lib/elastic/app-search/api/delete_api_key.rb +4 -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 +7 -9
- data/lib/elastic/app-search/api/delete_crawler_crawl_schedule.rb +4 -7
- data/lib/elastic/app-search/api/delete_crawler_domain.rb +6 -8
- data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +7 -9
- data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +7 -9
- data/lib/elastic/app-search/api/delete_curation.rb +5 -7
- data/lib/elastic/app-search/api/delete_documents.rb +4 -5
- data/lib/elastic/app-search/api/delete_engine.rb +3 -6
- data/lib/elastic/app-search/api/delete_meta_engine_source.rb +4 -4
- data/lib/elastic/app-search/api/delete_synonym_set.rb +5 -7
- data/lib/elastic/app-search/api/documents.rb +5 -5
- data/lib/elastic/app-search/api/engine.rb +3 -6
- data/lib/elastic/app-search/api/index_documents.rb +4 -5
- data/lib/elastic/{workplace-search/api/remove_user_permissions.rb → app-search/api/list_adaptive_relevance_suggestions.rb} +13 -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 +9 -8
- data/lib/elastic/{workplace-search/api/put_user_permissions.rb → app-search/api/put_adaptive_relevance_settings.rb} +13 -14
- data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +51 -0
- data/lib/elastic/app-search/api/put_api_key.rb +11 -10
- data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +14 -12
- data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +8 -7
- data/lib/elastic/app-search/api/put_crawler_domain.rb +9 -9
- data/lib/elastic/app-search/api/put_crawler_entry_point.rb +11 -9
- data/lib/elastic/app-search/api/put_crawler_sitemap.rb +11 -9
- data/lib/elastic/app-search/api/put_curation.rb +11 -9
- data/lib/elastic/app-search/api/put_documents.rb +4 -4
- data/lib/elastic/app-search/api/put_schema.rb +4 -4
- data/lib/elastic/app-search/api/put_search_settings.rb +6 -6
- data/lib/elastic/app-search/api/put_synonym_set.rb +8 -8
- data/lib/elastic/app-search/api/query_suggestion.rb +5 -5
- data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +56 -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 +6 -5
- data/lib/elastic/app-search/api/search_settings.rb +3 -6
- data/lib/elastic/app-search/api/synonym_set.rb +5 -7
- data/lib/elastic/app-search/api/top_clicks_analytics.rb +5 -5
- data/lib/elastic/app-search/api/top_queries_analytics.rb +4 -4
- data/lib/elastic/enterprise-search/api/health.rb +2 -3
- data/lib/elastic/enterprise-search/api/put_read_only.rb +6 -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 +21 -14
- 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/lib/elastic/workplace-search/workplace_search.rb +9 -2
- 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 +39 -2
- metadata +29 -20
- 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,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,14 @@ 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) || {}
|
41
|
-
headers = arguments.delete(:headers) || {}
|
38
|
+
domain_id = arguments.delete(:domain_id)
|
42
39
|
|
40
|
+
headers = arguments.delete(:headers) || {}
|
43
41
|
request(
|
44
42
|
:delete,
|
45
|
-
"api/as/
|
43
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/",
|
46
44
|
arguments,
|
47
|
-
|
45
|
+
nil,
|
48
46
|
headers
|
49
47
|
)
|
50
48
|
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,15 @@ 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) || {}
|
44
|
-
headers = arguments.delete(:headers) || {}
|
40
|
+
domain_id = arguments.delete(:domain_id)
|
41
|
+
entry_point_id = arguments.delete(:entry_point_id)
|
45
42
|
|
43
|
+
headers = arguments.delete(:headers) || {}
|
46
44
|
request(
|
47
45
|
:delete,
|
48
|
-
"api/as/
|
46
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/entry_points/#{entry_point_id}/",
|
49
47
|
arguments,
|
50
|
-
|
48
|
+
nil,
|
51
49
|
headers
|
52
50
|
)
|
53
51
|
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,15 @@ 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) || {}
|
44
|
-
headers = arguments.delete(:headers) || {}
|
40
|
+
domain_id = arguments.delete(:domain_id)
|
41
|
+
sitemap_id = arguments.delete(:sitemap_id)
|
45
42
|
|
43
|
+
headers = arguments.delete(:headers) || {}
|
46
44
|
request(
|
47
45
|
:delete,
|
48
|
-
"api/as/
|
46
|
+
"api/as/v1/engines/#{engine_name}/crawler/domains/#{domain_id}/sitemaps/#{sitemap_id}/",
|
49
47
|
arguments,
|
50
|
-
|
48
|
+
nil,
|
51
49
|
headers
|
52
50
|
)
|
53
51
|
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,14 @@ 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) || {}
|
41
|
-
headers = arguments.delete(:headers) || {}
|
38
|
+
curation_id = arguments.delete(:curation_id)
|
42
39
|
|
40
|
+
headers = arguments.delete(:headers) || {}
|
43
41
|
request(
|
44
42
|
:delete,
|
45
43
|
"api/as/v1/engines/#{engine_name}/curations/#{curation_id}/",
|
46
44
|
arguments,
|
47
|
-
|
45
|
+
nil,
|
48
46
|
headers
|
49
47
|
)
|
50
48
|
end
|
@@ -24,20 +24,19 @@ module Elastic
|
|
24
24
|
# Documents - Delete documents by ID
|
25
25
|
# Deletes documents for given Document IDs
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Array] :document_ids
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Array<String>] :document_ids
|
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/documents.html#documents-delete
|
33
33
|
#
|
34
34
|
def delete_documents(engine_name, arguments = {})
|
35
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
|
-
raise ArgumentError, "Required parameter 'document_ids' missing" unless arguments[:document_ids]
|
37
36
|
|
38
37
|
document_ids = arguments.delete(:document_ids) || {}
|
39
|
-
headers = arguments.delete(:headers) || {}
|
40
38
|
|
39
|
+
headers = arguments.delete(:headers) || {}
|
41
40
|
request(
|
42
41
|
:delete,
|
43
42
|
"api/as/v1/engines/#{engine_name}/documents/",
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Engines - Delete an Engine
|
25
25
|
# Delete an engine by name
|
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/engines.html#engines-delete
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def delete_engine(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
39
|
"api/as/v1/engines/#{engine_name}/",
|
43
40
|
arguments,
|
44
|
-
|
41
|
+
nil,
|
45
42
|
headers
|
46
43
|
)
|
47
44
|
end
|
@@ -24,9 +24,9 @@ module Elastic
|
|
24
24
|
# Engines - Delete a source engine
|
25
25
|
# Deletes a source engine from 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-remove-source-engines
|
@@ -35,8 +35,8 @@ module Elastic
|
|
35
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
36
|
|
37
37
|
source_engines = arguments.delete(:source_engines) || {}
|
38
|
-
headers = arguments.delete(:headers) || {}
|
39
38
|
|
39
|
+
headers = arguments.delete(:headers) || {}
|
40
40
|
request(
|
41
41
|
:delete,
|
42
42
|
"api/as/v1/engines/#{engine_name}/source_engines/",
|
@@ -24,10 +24,9 @@ module Elastic
|
|
24
24
|
# Synonyms - Delete a synonym set
|
25
25
|
# Deletes a synonym 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] :synonym_set_id Synonym Set 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/synonyms.html#synonyms-delete
|
@@ -36,15 +35,14 @@ module Elastic
|
|
36
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
37
36
|
raise ArgumentError, "Required parameter 'synonym_set_id' missing" unless arguments[:synonym_set_id]
|
38
37
|
|
39
|
-
synonym_set_id = arguments
|
40
|
-
body = arguments.delete(:body) || {}
|
41
|
-
headers = arguments.delete(:headers) || {}
|
38
|
+
synonym_set_id = arguments.delete(:synonym_set_id)
|
42
39
|
|
40
|
+
headers = arguments.delete(:headers) || {}
|
43
41
|
request(
|
44
42
|
:delete,
|
45
43
|
"api/as/v1/engines/#{engine_name}/synonyms/#{synonym_set_id}/",
|
46
44
|
arguments,
|
47
|
-
|
45
|
+
nil,
|
48
46
|
headers
|
49
47
|
)
|
50
48
|
end
|
@@ -24,20 +24,20 @@ module Elastic
|
|
24
24
|
# Documents - Retrieve one or more documents
|
25
25
|
# Retrieves one or more documents by id
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Array] :
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Array] :ids[] List of Document IDs to fetch
|
30
|
+
# @option arguments [Array<String>] :document_ids
|
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/documents.html#documents-get
|
33
34
|
#
|
34
35
|
def documents(engine_name, arguments = {})
|
35
36
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
|
-
raise ArgumentError, "Required parameter 'document_ids' missing" unless arguments[:document_ids]
|
37
37
|
|
38
38
|
document_ids = arguments.delete(:document_ids) || {}
|
39
|
-
headers = arguments.delete(:headers) || {}
|
40
39
|
|
40
|
+
headers = arguments.delete(:headers) || {}
|
41
41
|
request(
|
42
42
|
:get,
|
43
43
|
"api/as/v1/engines/#{engine_name}/documents/",
|
@@ -24,9 +24,8 @@ module Elastic
|
|
24
24
|
# Engines - Retrieve an engine
|
25
25
|
# Retrieves details of a given engine by its name
|
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/engines.html#engines-get
|
@@ -34,14 +33,12 @@ module Elastic
|
|
34
33
|
def engine(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
39
|
"api/as/v1/engines/#{engine_name}/",
|
43
40
|
arguments,
|
44
|
-
|
41
|
+
nil,
|
45
42
|
headers
|
46
43
|
)
|
47
44
|
end
|
@@ -24,20 +24,19 @@ module Elastic
|
|
24
24
|
# Documents - Create a new document
|
25
25
|
# Create or update documents
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Array
|
27
|
+
# @param [String] engine_name Name of the engine (*Required*)
|
28
|
+
# @param [Hash] arguments endpoint arguments
|
29
|
+
# @option arguments [Array<Hash> { id: [string] }] :documents
|
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/documents.html#documents-create
|
33
33
|
#
|
34
34
|
def index_documents(engine_name, arguments = {})
|
35
35
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
36
|
-
raise ArgumentError, "Required parameter 'documents' missing" unless arguments[:documents]
|
37
36
|
|
38
37
|
documents = arguments.delete(:documents) || {}
|
39
|
-
headers = arguments.delete(:headers) || {}
|
40
38
|
|
39
|
+
headers = arguments.delete(:headers) || {}
|
41
40
|
request(
|
42
41
|
:post,
|
43
42
|
"api/as/v1/engines/#{engine_name}/documents/",
|
@@ -19,30 +19,29 @@
|
|
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
|
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 [Hash] :body
|
30
|
+
# @option body :page
|
31
|
+
# @option body [string] :filters
|
31
32
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
32
33
|
#
|
33
|
-
# @see https://www.elastic.co/guide/en/
|
34
|
+
# @see https://www.elastic.co/guide/en/app-search/current/adaptive-relevance-api-reference.html#adaptive-relevance-api-get-engine-adaptive-relevance-suggestions
|
34
35
|
#
|
35
|
-
def
|
36
|
-
raise ArgumentError, "Required parameter '
|
37
|
-
raise ArgumentError, "Required parameter 'user' missing" unless arguments[:user]
|
36
|
+
def list_adaptive_relevance_suggestions(engine_name, arguments = {})
|
37
|
+
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
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
|
:post,
|
45
|
-
"api/
|
44
|
+
"api/as/v0/engines/#{engine_name}/adaptive_relevance/suggestions/",
|
46
45
|
arguments,
|
47
46
|
body,
|
48
47
|
headers
|
@@ -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
|
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
|
-
|
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
|
28
|
-
# @param
|
29
|
-
# @option arguments [Integer] :
|
30
|
-
# @option arguments [
|
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/
|
41
|
+
"api/as/v1/engines/#{engine_name}/crawler/crawl_requests/",
|
44
42
|
arguments,
|
45
|
-
|
43
|
+
nil,
|
46
44
|
headers
|
47
45
|
)
|
48
46
|
end
|
data/lib/elastic/{workplace-search/api/list_permissions.rb → app-search/api/list_crawler_domains.rb}
RENAMED
@@ -19,29 +19,28 @@
|
|
19
19
|
|
20
20
|
module Elastic
|
21
21
|
module EnterpriseSearch
|
22
|
-
module
|
22
|
+
module AppSearch
|
23
23
|
module Actions
|
24
|
-
#
|
25
|
-
#
|
24
|
+
# Crawler - List crawler domains
|
25
|
+
# Returns a list of crawler domains
|
26
26
|
#
|
27
|
-
# @param
|
28
|
-
# @param
|
29
|
-
# @option arguments [Integer] :current_page
|
30
|
-
# @option arguments [Integer] :page_size The number of results
|
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/
|
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
|
36
|
-
raise ArgumentError, "Required parameter '
|
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/
|
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
|
28
|
-
# @param
|
29
|
-
# @option arguments [
|
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/
|
41
|
+
"api/as/v1/engines/#{engine_name}/crawler/process_crawls/",
|
43
42
|
arguments,
|
44
|
-
|
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
|
28
|
-
# @param
|
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
|
-
|
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
|
28
|
-
# @param
|
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
|
-
|
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
|
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
|
-
|
40
|
+
nil,
|
44
41
|
headers
|
45
42
|
)
|
46
43
|
end
|