elastic-enterprise-search 8.0.0.pre → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.ci/jobs/{elastic+enterprise-search-ruby+7.13.yml → elastic+enterprise-search-ruby+7.17.yml} +4 -4
- data/.ci/jobs/{elastic+enterprise-search-ruby+7.14.yml → elastic+enterprise-search-ruby+8.0.yml} +4 -4
- data/.ci/run-enterprise-search.sh +1 -0
- data/.ci/test-matrix.yml +1 -1
- data/.github/workflows/testing.yml +1 -2
- data/docs/guide/app-search-api.asciidoc +58 -9
- data/docs/guide/release_notes/714.asciidoc +12 -0
- data/docs/guide/release_notes/715.asciidoc +12 -0
- data/docs/guide/release_notes/80.asciidoc +108 -5
- data/docs/guide/release_notes/81.asciidoc +8 -0
- data/docs/guide/release_notes/82.asciidoc +31 -0
- data/docs/guide/release_notes/index.asciidoc +5 -3
- data/docs/guide/workplace-search-api.asciidoc +17 -7
- data/elastic-enterprise-search.gemspec +1 -1
- data/lib/elastic/app-search/api/adaptive_relevance_suggestions.rb +1 -2
- data/lib/elastic/app-search/api/add_meta_engine_source.rb +0 -1
- data/lib/elastic/app-search/api/api_key.rb +0 -1
- data/lib/elastic/app-search/api/api_logs.rb +0 -1
- data/lib/elastic/app-search/api/count_analytics.rb +0 -1
- data/lib/elastic/app-search/api/crawler_crawl_request.rb +0 -1
- data/lib/elastic/app-search/api/crawler_domain.rb +0 -1
- data/lib/elastic/app-search/api/crawler_domain_validation_result.rb +0 -1
- data/lib/elastic/app-search/api/crawler_process_crawl.rb +0 -1
- data/lib/elastic/app-search/api/crawler_process_crawl_denied_urls.rb +0 -1
- data/lib/elastic/app-search/api/crawler_url_extraction_result.rb +1 -2
- data/lib/elastic/app-search/api/crawler_url_tracing_result.rb +0 -1
- data/lib/elastic/app-search/api/crawler_url_validation_result.rb +0 -1
- data/lib/elastic/app-search/api/create_api_key.rb +0 -1
- data/lib/elastic/app-search/api/create_crawler_crawl_request.rb +1 -1
- data/lib/elastic/app-search/api/create_crawler_crawl_rule.rb +0 -1
- data/lib/elastic/app-search/api/create_crawler_domain.rb +0 -1
- data/lib/elastic/app-search/api/create_crawler_entry_point.rb +0 -1
- data/lib/elastic/app-search/api/create_crawler_process_crawl.rb +0 -1
- data/lib/elastic/app-search/api/create_crawler_sitemap.rb +0 -1
- data/lib/elastic/app-search/api/create_curation.rb +1 -2
- data/lib/elastic/app-search/api/create_engine.rb +0 -1
- data/lib/elastic/app-search/api/create_synonym_set.rb +0 -1
- data/lib/elastic/app-search/api/curation.rb +0 -1
- data/lib/elastic/app-search/api/delete_api_key.rb +0 -1
- data/lib/elastic/app-search/api/delete_crawler_crawl_rule.rb +0 -1
- data/lib/elastic/app-search/api/delete_crawler_domain.rb +0 -1
- data/lib/elastic/app-search/api/delete_crawler_entry_point.rb +0 -1
- data/lib/elastic/app-search/api/delete_crawler_sitemap.rb +0 -1
- data/lib/elastic/app-search/api/delete_curation.rb +0 -1
- data/lib/elastic/app-search/api/delete_documents.rb +0 -1
- data/lib/elastic/app-search/api/delete_meta_engine_source.rb +0 -1
- data/lib/elastic/app-search/api/delete_synonym_set.rb +0 -1
- data/lib/elastic/app-search/api/documents.rb +0 -1
- data/lib/elastic/app-search/api/index_documents.rb +0 -1
- data/lib/elastic/app-search/api/list_adaptive_relevance_suggestions.rb +1 -2
- data/lib/elastic/app-search/api/log_clickthrough.rb +0 -1
- data/lib/elastic/app-search/api/put_adaptive_relevance_settings.rb +1 -2
- data/lib/elastic/app-search/api/put_adaptive_relevance_suggestions.rb +0 -1
- data/lib/elastic/app-search/api/put_api_key.rb +0 -1
- data/lib/elastic/app-search/api/put_crawler_crawl_rule.rb +0 -1
- data/lib/elastic/app-search/api/put_crawler_crawl_schedule.rb +0 -1
- data/lib/elastic/app-search/api/put_crawler_domain.rb +0 -1
- data/lib/elastic/app-search/api/put_crawler_entry_point.rb +0 -1
- data/lib/elastic/app-search/api/put_crawler_sitemap.rb +0 -1
- data/lib/elastic/app-search/api/put_curation.rb +1 -2
- data/lib/elastic/app-search/api/put_documents.rb +0 -1
- data/lib/elastic/app-search/api/put_schema.rb +0 -1
- data/lib/elastic/app-search/api/put_search_settings.rb +0 -1
- data/lib/elastic/app-search/api/put_synonym_set.rb +0 -1
- data/lib/elastic/app-search/api/query_suggestion.rb +0 -1
- data/lib/elastic/app-search/api/refresh_adaptive_relevance_update_process.rb +0 -1
- data/lib/elastic/app-search/api/search.rb +0 -1
- data/lib/elastic/app-search/api/search_es_search.rb +53 -0
- data/lib/elastic/app-search/api/search_explain.rb +61 -0
- data/lib/elastic/app-search/api/synonym_set.rb +0 -1
- data/lib/elastic/app-search/api/top_clicks_analytics.rb +0 -1
- data/lib/elastic/app-search/api/top_queries_analytics.rb +0 -1
- data/lib/elastic/enterprise-search/api/put_read_only.rb +0 -1
- data/lib/elastic/enterprise-search/api/version.rb +1 -1
- data/lib/elastic/enterprise-search/version.rb +1 -1
- data/spec/integration/app-search/elasticsearch_search_spec.rb +63 -0
- data/spec/integration/app-search/explain_search_spec.rb +59 -0
- metadata +14 -10
- data/.ci/jobs/elastic+enterprise-search-ruby+7.15.yml +0 -12
- data/.ci/jobs/elastic+enterprise-search-ruby+7.16.yml +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5beefad27301e777c767b0759b154f6e0bba47db65e0e02cacd206f4ff2c2696
|
4
|
+
data.tar.gz: 86610a1a51529bf54c454e93f2977a1968887e3737e1bfd2ef058b255a1b1975
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e0e3f3bcf5994ea89f6dc399527c1a02b5b2699ed3af62fedf9d7bf62b32d2c475b104988190b7be5f1d1368ed73241f53392c6934663a76425648bfadf5f7
|
7
|
+
data.tar.gz: 691d3a79357db4880f777fd4a6975c9a434ade303037d7a94523d82e67266c553d7fded40e7f883b6e283d438b7a66d8d8dce7a72a48c4387c65b746c359aa4b
|
data/.ci/jobs/{elastic+enterprise-search-ruby+7.13.yml → elastic+enterprise-search-ruby+7.17.yml}
RENAMED
@@ -1,12 +1,12 @@
|
|
1
1
|
---
|
2
2
|
- job:
|
3
|
-
name: elastic+enterprise-search-ruby+7.
|
4
|
-
display-name: 'elastic / enterprise-search-ruby # 7.
|
5
|
-
description: Testing the enterprise-search-ruby 7.
|
3
|
+
name: elastic+enterprise-search-ruby+7.17
|
4
|
+
display-name: 'elastic / enterprise-search-ruby # 7.17'
|
5
|
+
description: Testing the enterprise-search-ruby 7.17 branch.
|
6
6
|
junit_results: "*-junit.xml"
|
7
7
|
parameters:
|
8
8
|
- string:
|
9
9
|
name: branch_specifier
|
10
|
-
default: refs/heads/7.
|
10
|
+
default: refs/heads/7.17
|
11
11
|
description: the Git branch specifier to build (<branchName>, <tagName>,
|
12
12
|
<commitId>, etc.)
|
data/.ci/jobs/{elastic+enterprise-search-ruby+7.14.yml → elastic+enterprise-search-ruby+8.0.yml}
RENAMED
@@ -1,12 +1,12 @@
|
|
1
1
|
---
|
2
2
|
- job:
|
3
|
-
name: elastic+enterprise-search-ruby+
|
4
|
-
display-name: 'elastic / enterprise-search-ruby #
|
5
|
-
description: Testing the enterprise-search-ruby
|
3
|
+
name: elastic+enterprise-search-ruby+8.0
|
4
|
+
display-name: 'elastic / enterprise-search-ruby # 8.0'
|
5
|
+
description: Testing the enterprise-search-ruby 8.0 branch.
|
6
6
|
junit_results: "*-junit.xml"
|
7
7
|
parameters:
|
8
8
|
- string:
|
9
9
|
name: branch_specifier
|
10
|
-
default: refs/heads/
|
10
|
+
default: refs/heads/8.0
|
11
11
|
description: the Git branch specifier to build (<branchName>, <tagName>,
|
12
12
|
<commitId>, etc.)
|
@@ -54,6 +54,7 @@ docker run \
|
|
54
54
|
--env "elasticsearch.ssl.certificate=/usr/share/app-search/config/certs/testnode.crt" \
|
55
55
|
--env "elasticsearch.ssl.certificate_authority=/usr/share/app-search/config/certs/ca.crt" \
|
56
56
|
--env "elasticsearch.ssl.key=/usr/share/app-search/config/certs/testnode.key" \
|
57
|
+
--env "ELASTICSEARCH_SEARCH_API=true" \
|
57
58
|
--volume $ssl_cert:/usr/share/app-search/config/certs/testnode.crt \
|
58
59
|
--volume $ssl_key:/usr/share/app-search/config/certs/testnode.key \
|
59
60
|
--volume $ssl_ca:/usr/share/app-search/config/certs/ca.crt \
|
data/.ci/test-matrix.yml
CHANGED
@@ -8,7 +8,7 @@ This document includes examples for different API requests. Please refer to the
|
|
8
8
|
[source,rb]
|
9
9
|
----------------------------
|
10
10
|
# Create an engine
|
11
|
-
client.create_engine(name: 'videogames')
|
11
|
+
client.create_engine(body: { name: 'videogames' })
|
12
12
|
|
13
13
|
# List all engines
|
14
14
|
client.list_engines
|
@@ -30,7 +30,7 @@ body = {
|
|
30
30
|
type: 'meta',
|
31
31
|
source_engines: [ 'books', 'videogames' ]
|
32
32
|
}
|
33
|
-
client.create_engine(
|
33
|
+
client.create_engine(body: body)
|
34
34
|
|
35
35
|
# Add a source engine to a meta engine:
|
36
36
|
client.add_meta_engine_source(meta_engine_name, source_engines: ['engine1', 'engine2'])
|
@@ -184,13 +184,6 @@ client.delete_api_key(api_key_name: name)
|
|
184
184
|
|
185
185
|
=== Web Crawler
|
186
186
|
|
187
|
-
[CAUTION]
|
188
|
-
====
|
189
|
-
The Elastic Enterprise Search web crawler API is a *beta* feature.
|
190
|
-
Beta features are subject to change and are not covered by the support SLA of general release (GA) features.
|
191
|
-
Elastic plans to promote this feature to GA in a future release.
|
192
|
-
====
|
193
|
-
|
194
187
|
See https://www.elastic.co/guide/en/app-search/current/web-crawler-api-reference.html[Web Crawler API reference] for more information.
|
195
188
|
|
196
189
|
[source,rb]
|
@@ -202,6 +195,9 @@ client.create_crawler_domain(engine_name, body: body)
|
|
202
195
|
# Get crawler domain information
|
203
196
|
client.crawler_domain(engine_name, domain_id: domain_id)
|
204
197
|
|
198
|
+
# List crawler domains
|
199
|
+
client.list_crawler_domains(engine_name)
|
200
|
+
|
205
201
|
# Update a crawler domain
|
206
202
|
body = { name: 'https://www.wikipedia.org' }
|
207
203
|
client.put_crawler_domain(engine_name, domain_id: domain_id, domain: body)
|
@@ -308,6 +304,59 @@ client.crawler_process_crawl_denied_urls(engine_name, process_crawl_id: id)
|
|
308
304
|
client.delete_crawler_active_crawl_request(engine_name)
|
309
305
|
----------------------------
|
310
306
|
|
307
|
+
=== Adaptive Relevance Suggestions
|
308
|
+
|
309
|
+
[source,rb]
|
310
|
+
----------------------------
|
311
|
+
# Update an adaptive relevance suggestion
|
312
|
+
body = [{ query: 'forest', type: 'curation', status: 'applied' }]
|
313
|
+
client.put_adaptive_relevance_suggestions(engine_name, body: body)
|
314
|
+
|
315
|
+
# Retrieve an adaptive relevance suggestion
|
316
|
+
client.adaptive_relevance_suggestions(engine_name, search_suggestion_query: 'test')
|
317
|
+
|
318
|
+
# List adaptive relevance suggestions
|
319
|
+
client.list_adaptive_relevance_suggestions(engine_name)
|
320
|
+
----------------------------
|
321
|
+
|
322
|
+
=== Adaptive Relevance Settings
|
323
|
+
|
324
|
+
[source,rb]
|
325
|
+
----------------------------
|
326
|
+
# Show the settings for an engine
|
327
|
+
client.adaptive_relevance_settings(engine_name)
|
328
|
+
|
329
|
+
# Update relevance settings
|
330
|
+
body = {
|
331
|
+
curation: { enabled: true }
|
332
|
+
}
|
333
|
+
client.put_adaptive_relevance_settings(engine_name, body: body)
|
334
|
+
|
335
|
+
# Refresh adaptive relevance update process
|
336
|
+
client.refresh_adaptive_relevance_update_process(engine_name, adaptive_relevance_suggestion_type: 'curation')
|
337
|
+
----------------------------
|
338
|
+
|
339
|
+
=== Elasticsearch Search
|
340
|
+
|
341
|
+
Utilize the API to passthrough and execute raw Elasticsearch queries against the indices that power Enterprise Search engines.
|
342
|
+
|
343
|
+
[source,rb]
|
344
|
+
----------------------------
|
345
|
+
es_request = { body: { query: { bool: { must: { term: { title: 'test' } } } } } }
|
346
|
+
client.search_es_search(engine_name, body: { request: es_request })
|
347
|
+
----------------------------
|
348
|
+
|
349
|
+
=== Search Explain
|
350
|
+
|
351
|
+
Submit a search and retrieve an Elasticsearch query.
|
352
|
+
|
353
|
+
[source,rb]
|
354
|
+
----------------------------
|
355
|
+
response = client.search_explain(engine_name, body: { query: 'test' })
|
356
|
+
response.body['query_string']
|
357
|
+
# => "GET enterprise-search-engine-app-search-explain/_search"
|
358
|
+
----------------------------
|
359
|
+
|
311
360
|
=== Other API Endpoints
|
312
361
|
|
313
362
|
[source,rb]
|
@@ -1,4 +1,16 @@
|
|
1
1
|
[[release_notes_714]]
|
2
|
+
=== 7.14 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
[[release_notes_7141]]
|
6
|
+
=== 7.14.1 Release notes
|
7
|
+
|
8
|
+
==== Dependency fix
|
9
|
+
|
10
|
+
Updates dependency on `elasticsearch-transport` to be more open. At least 7.11 is required, but this way it can be used with different versions of the `elasticsearch` gem (bigger than or equal to `7.11`) in the same project, without a conflict in `elasticsearch-transport`. When instantiating transport, we now check if version is `< 7.14` so we use the right class.
|
11
|
+
|
12
|
+
[discrete]
|
13
|
+
[[release_notes_7140]]
|
2
14
|
=== 7.14.0 Release notes
|
3
15
|
|
4
16
|
[discrete]
|
@@ -1,4 +1,16 @@
|
|
1
1
|
[[release_notes_715]]
|
2
|
+
=== 7.15 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
[[release_notes_7151]]
|
6
|
+
=== 7.15.1 Release notes
|
7
|
+
|
8
|
+
==== Dependency fix
|
9
|
+
|
10
|
+
Updates dependency on `elasticsearch-transport` to be more open. At least 7.11 is required, but this way it can be used with different versions of the `elasticsearch` gem (bigger than or equal to `7.11`) in the same project, without a conflict in `elasticsearch-transport`. When instantiating transport, we now check if version is `< 7.14` so we use the right class.
|
11
|
+
|
12
|
+
[discrete]
|
13
|
+
[[release_notes_7150]]
|
2
14
|
=== 7.15.0 Release notes
|
3
15
|
|
4
16
|
[discrete]
|
@@ -1,14 +1,117 @@
|
|
1
1
|
[[release_notes_80]]
|
2
|
-
=== 8.0.0
|
2
|
+
=== 8.0.0 Release notes
|
3
3
|
|
4
4
|
[discrete]
|
5
5
|
==== General
|
6
6
|
|
7
|
-
|
7
|
+
First release in the `8.x` branch of the client.
|
8
8
|
|
9
9
|
- Tested with Elastic Enterprise Search API version 8.0-SNAPSHOT.
|
10
|
-
- Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3.
|
11
|
-
-
|
10
|
+
- Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3. Older versions of Ruby have reached end of life and been removed from the testing matrices. Minimum required Ruby version is Ruby 2.6 to keep compatibility with JRuby 9.3, but it may be upgraded to 2.7 once JRuby 9.4 comes out.
|
11
|
+
- API: Updated endpoints that make a `GET` or `DELETE` requests to not have a `body`. Requests with `PUT` and `POST` now expect most parameters to be in the request body. Parameters that were available as both arguments and in the body are now just in the body.
|
12
|
+
- API: An updated generator is being used to generate the endpoint code. The source code documentation has better typing hints for parameters.
|
12
13
|
|
13
|
-
|
14
|
+
[discrete]
|
15
|
+
==== Response Object
|
16
|
+
|
17
|
+
* Requests now return an `Elastic::API::Response` object. This behaves exactly the same as the previous response (`Elastic::Transport::Transport::Response`) but expands its functionality. With the previous response object, the body of the response had to be accessed calling the `body` method on the response. This new object behaves like the response.body Hash object, except when the `status` or `headers` are sent to it. This makes it easier to access the response data. Example:
|
18
|
+
|
19
|
+
+
|
20
|
+
[source,rb]
|
21
|
+
----------------------------
|
22
|
+
client = Elastic::EnterpriseSearch::Client.new(
|
23
|
+
host: 'http://localhost:3002',
|
24
|
+
http_auth: {user: 'elastic', password: 'changeme'}
|
25
|
+
)
|
26
|
+
response = client.health
|
27
|
+
response.class
|
28
|
+
# => Elastic::API::Response
|
29
|
+
response['version']['number']
|
30
|
+
# => "8.1.4"
|
31
|
+
response.body['version']['number']
|
32
|
+
# => "8.1.4"
|
33
|
+
response.status
|
34
|
+
# => 200
|
35
|
+
response.headers
|
36
|
+
# =>
|
37
|
+
{"date"=>"Tue, 10 May 2022 09:01:10 GMT",
|
38
|
+
"content-type"=>"application/json;charset=utf-8",
|
39
|
+
"etag"=>"W/\"etag--gzip\"",
|
40
|
+
"cache-control"=>"max-age=0, private, must-revalidate",
|
41
|
+
"x-request-id"=>"id",
|
42
|
+
"x-runtime"=>"0.023468",
|
43
|
+
"vary"=>"Accept-Encoding, User-Agent",
|
44
|
+
"content-length"=>"755",
|
45
|
+
"server"=>"Jetty(9.4.43.v20210629)"}
|
46
|
+
----------------------------
|
47
|
+
|
48
|
+
[discrete]
|
49
|
+
==== App Search
|
50
|
+
|
51
|
+
[discrete]
|
52
|
+
===== API Changes
|
53
|
+
|
54
|
+
- API Logs: Removes `date` parameters for filters. This API requires a nested date object under `filters` (now passed in via the body) containing `from` and `to` keys formatted in accordance with RFC3339. The App Search client provides the helper function `date_to_rfc3339` which receives a date String and converts it to the right format.
|
55
|
+
- Crawler API : Internal Url updated from `v0` to `v1`. `create_crawler_crawl_rule` body is a required parameter (`order`, `policy`, `rule`, `pattern`). `create_crawler_entry_point` body is required (for `value`). `create_crawler_sitemap` body is required (for `url`). `put_crawler_crawl_rule` body is required (`order`, `policy`, `rule`, `pattern`). `put_crawler_crawl_schedule` body is required (`frequency`, `unit`). `put_crawler_entry_point` body is required (for `value`). `put_crawler_sitemap` body is required (`url`).
|
56
|
+
- Curations API: parameters for `create_curation` and `put_curation` must be passed in inside the body parameter now.
|
57
|
+
- Engine APIs: `create_engine` removes the `name` parameter. It must be passed in inside the body parameter now.
|
58
|
+
- Log Click: `log_clickthrough` now requires `body`, the parameter `query` and `document_id` are required.
|
59
|
+
- Search: When using `search`, query can no longer be sent as an argument. The method will raise `ArgumentError` if no body is sent, since `query` is a required parameter in the body.
|
60
|
+
- APIs where `body` has been removed since it's not used: `delete_engine`, `engine`, `list_engines`, `curation`, `delete_curation`, `schema`, `api_key`, `delete_api_key`, `list_api_keys`, `delete_synonym_set`, `list_synonym_set`, `synonym_set`, `list_documents`, `reset_search_settings`, `search_settings`, `crawler_active_crawl_request`, `crawler_crawl_request`, `crawler_crawl_schedule`, `crawler_domain`, `crawler_metrics`, `crawler_overview`, `crawler_process_crawl`, `crawler_process_crawl_denied_urls`, `crawler_user_agent`, `delete_crawler_active_crawl_request`, `delete_crawler_crawl_rule`, `delete_crawler_crawl_schedule`, `delete_crawler_domain`, `delete_crawler_entry_point`, `delete_crawler_sitemap`, `list_crawler_crawl_requests`, `list_crawler_process_crawls`.
|
61
|
+
|
62
|
+
[discrete]
|
63
|
+
===== New APIs
|
64
|
+
|
65
|
+
* `list_crawler_domain`: Lists crawler domains given an engine.
|
66
|
+
* Adaptive Relevance Suggestion APIs:
|
67
|
+
** `adaptive_relevance_suggestions` - Retrieves adaptive relevance for a single query.
|
68
|
+
** `list_adaptive_relevance_suggestions` - List the adaptive relevance suggestions for a given engine.
|
69
|
+
** `put_adaptive_relevance_suggestions` - Update adaptive relevance.
|
70
|
+
* Adaptive Relevance Settings APIs:
|
71
|
+
** `adaptive_relevance_settings` - Retrieve adaptive relevance settings.
|
72
|
+
** `put_adaptive_relevance_settings` - Update adaptive relevance settings.
|
73
|
+
** `refresh_adaptive_relevance_update_process` - Update suggestions process refresh.
|
14
74
|
|
75
|
+
[discrete]
|
76
|
+
==== Enterprise Search
|
77
|
+
|
78
|
+
- Read-Only API: `put_read_only` body is now required with the enabled object: `{enabled: true|false}`.
|
79
|
+
- APIs where `body` has been removed since it's not used: `health`, `read_only`, `stats`, `version`.
|
80
|
+
|
81
|
+
[discrete]
|
82
|
+
==== Workplace Search
|
83
|
+
|
84
|
+
[discrete]
|
85
|
+
===== API Changes
|
86
|
+
|
87
|
+
* Permissions APIs have been removed: `add_user_permissions`, `list_permissions`, `put_user_permissions`, `remove_user_permissions`, `user_permissions`.
|
88
|
+
* `current_user` removed `get_token` parameter.
|
89
|
+
* Analytics: `create_analytics_events` will raise ArgumentError if body is missing (Required: type, query_id, page, content_source_id, document_id, rank)
|
90
|
+
* Content Sources: `create_content_source` will raise ArgumentError if body is missing (Required: name). `name` cannot be passed in as a parameter anymore, needs to be in the body. `put_content_source` will raise ArgumentError if body is missing (Required: name, is_searchable). `put_content_source_icons` will raise ArgumentError if body is missing.
|
91
|
+
* External Identities: `create_external_identity` will raise ArgumentError if body is missing (Required: external_user_id, external_user_properties, permissions). Body parameters have changed:
|
92
|
+
|
93
|
+
+
|
94
|
+
[source,rb]
|
95
|
+
----------------------------
|
96
|
+
body = {
|
97
|
+
external_user_id: external_user_id,
|
98
|
+
permissions: [],
|
99
|
+
external_user_properties: [
|
100
|
+
'attribute_name' => '_elasticsearch_username',
|
101
|
+
'attribute_value' => 'fernando'
|
102
|
+
]
|
103
|
+
}
|
104
|
+
client.create_external_identity(content_source_id, body: body)
|
105
|
+
----------------------------
|
106
|
+
+
|
107
|
+
In `delete_external_identity`, `external_identity` and `put_external_identity` the required parameter changed from `user` to `external_user_id`.
|
108
|
+
See https://www.elastic.co/guide/en/workplace-search/current/workplace-search-external-identities-api.html
|
109
|
+
* Search: Parameters need to be passed in via body to `search`. It will raise ArgumentError if body is missing.
|
110
|
+
* Documents: `delete_documents` will raise ArgumentError if body is missing (Required document_ids).
|
111
|
+
* Sync Jobs: `command_sync_jobs` will raise ArgumentError if body is missing.
|
112
|
+
* Synonyms: `create_batch_synonym_sets`, `put_synonym_set` will raise ArgumentError if body is missing.
|
113
|
+
* APIs where `body` has been removed since it's not used: `auto_query_refinement_details`, `content_source`, `current_user`, `delete_content_source`, `delete_external_identity`, `delete_synonym_set`, `document`, `external_identity`, `list_content_sources`, `list_external_identities`, `put_triggers_blocklist`, `synonym_set`, `triggers_blocklist`.
|
114
|
+
|
115
|
+
[discrete]
|
116
|
+
===== New APIs
|
117
|
+
- `list_documents`: Lists documents from a custom content source.
|
@@ -0,0 +1,8 @@
|
|
1
|
+
[[release_notes_81]]
|
2
|
+
=== 8.1.0 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
==== General
|
6
|
+
|
7
|
+
- Tested with Elastic Enterprise Search API version 8.1.0.
|
8
|
+
- Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3. Older versions of Ruby have reached end of life and been removed from the testing matrices. Minimum required Ruby version is Ruby 2.6 to keep compatibility with JRuby 9.3, but it may be upgraded to 2.7 once JRuby 9.4 comes out.
|
@@ -0,0 +1,31 @@
|
|
1
|
+
[[release_notes_82]]
|
2
|
+
=== 8.2.0 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
==== General
|
6
|
+
|
7
|
+
- Tested with Elastic Enterprise Search API version 8.2.0.
|
8
|
+
- Tested with Ruby 2.7, 3.0, 3.1, JRuby 9.3. Older versions of Ruby have reached end of life and been removed from the testing matrices. Minimum required Ruby version is Ruby 2.6 to keep compatibility with JRuby 9.3, but it may be upgraded to 2.7 once JRuby 9.4 comes out.
|
9
|
+
|
10
|
+
[discrete]
|
11
|
+
==== App Search
|
12
|
+
[discrete]
|
13
|
+
==== New APIs
|
14
|
+
|
15
|
+
* Adds Elasticsearch Search API (In Technical Preview): Utilize the API to passthrough and execute raw Elasticsearch queries against the indices that power Enterprise Search engines.
|
16
|
+
|
17
|
+
+
|
18
|
+
[source,rb]
|
19
|
+
----------------------------
|
20
|
+
es_request = { body: { query: { bool: { must: { term: { title: 'test' } } } } } }
|
21
|
+
client.search_es_search(engine_name, body: { request: es_request })
|
22
|
+
----------------------------
|
23
|
+
|
24
|
+
* Adds Search Explain API: Submit a search and retrieve an Elasticsearch query.
|
25
|
+
+
|
26
|
+
[source,rb]
|
27
|
+
----------------------------
|
28
|
+
response = client.search_explain(engine_name, body: { query: 'test' })
|
29
|
+
response.body['query_string']
|
30
|
+
# => "GET enterprise-search-engine-app-search-explain/_search"
|
31
|
+
----------------------------
|
@@ -1,12 +1,12 @@
|
|
1
1
|
[[release_notes]]
|
2
2
|
== Release Notes
|
3
3
|
|
4
|
-
|
5
4
|
[discrete]
|
6
5
|
=== 8.x
|
7
6
|
|
8
|
-
* <<
|
9
|
-
|
7
|
+
* <<release_notes_82, 8.2.0 Release Notes>>
|
8
|
+
* <<release_notes_81, 8.1.0 Release Notes>>
|
9
|
+
* <<release_notes_80, 8.0.0 Release Notes>>
|
10
10
|
|
11
11
|
[discrete]
|
12
12
|
=== 7.x
|
@@ -20,6 +20,8 @@
|
|
20
20
|
* <<release_notes_711, 7.11.0 Release Notes>>
|
21
21
|
* <<release_notes_710, 7.10.0.beta.1 Release Notes>>
|
22
22
|
|
23
|
+
include::82.asciidoc[]
|
24
|
+
include::81.asciidoc[]
|
23
25
|
include::80.asciidoc[]
|
24
26
|
include::717.asciidoc[]
|
25
27
|
include::716.asciidoc[]
|
@@ -6,10 +6,10 @@
|
|
6
6
|
[source,rb]
|
7
7
|
----------------------------
|
8
8
|
# Create a custom content source
|
9
|
-
client.create_content_source(name: 'test')
|
9
|
+
client.create_content_source(body: { name: 'test' })
|
10
10
|
|
11
11
|
# Retrieve a content source by ID
|
12
|
-
content_source_id = client.create_content_source(name: 'books').body['id']
|
12
|
+
content_source_id = client.create_content_source(body: { name: 'books' }).body['id']
|
13
13
|
client.content_source(content_source_id)
|
14
14
|
|
15
15
|
# Delete a content source by ID
|
@@ -59,6 +59,9 @@ response = client.index_documents(content_source_id, body: documents)
|
|
59
59
|
# Retrieve a document by ID from a specified content source
|
60
60
|
client.document(content_source_id, document_id: '75015d85370d')
|
61
61
|
|
62
|
+
# List documents from a custom content source
|
63
|
+
client.list_documents(content_source_id)
|
64
|
+
|
62
65
|
# Delete Documents
|
63
66
|
client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])
|
64
67
|
|
@@ -136,21 +139,28 @@ client.remove_user_permissions(
|
|
136
139
|
[source,rb]
|
137
140
|
----------------------------
|
138
141
|
# Create external identities
|
139
|
-
body = {
|
142
|
+
body = {
|
143
|
+
external_user_id: external_user_id,
|
144
|
+
permissions: [],
|
145
|
+
external_user_properties: [
|
146
|
+
'attribute_name' => '_elasticsearch_username',
|
147
|
+
'attribute_value' => 'fernando'
|
148
|
+
]
|
149
|
+
}
|
140
150
|
client.create_external_identity(content_source_id, body: body)
|
141
151
|
|
142
152
|
# Retrieve an external identity
|
143
|
-
client.external_identity(content_source_id,
|
153
|
+
client.external_identity(content_source_id, external_user_id: external_user_id)
|
144
154
|
|
145
155
|
# List external identities
|
146
156
|
client.list_external_identities(content_source_id)
|
147
157
|
|
148
158
|
# Update external identity
|
149
|
-
body = {
|
150
|
-
client.put_external_identity(content_source_id,
|
159
|
+
body = { external_user_id: external_user_id, permissions: ['permission1'] }
|
160
|
+
client.put_external_identity(content_source_id, external_user_id: external_user_id, body: body)
|
151
161
|
|
152
162
|
# Delete an external identity
|
153
|
-
client.delete_external_identity(content_source_id,
|
163
|
+
client.delete_external_identity(content_source_id, external_user_id: external_user_id)
|
154
164
|
----------------------------
|
155
165
|
|
156
166
|
=== Search
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
|
|
47
47
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
48
48
|
s.require_paths = ['lib']
|
49
49
|
|
50
|
-
s.add_dependency 'elastic-transport', '8.0.0.pre.
|
50
|
+
s.add_dependency 'elastic-transport', '8.0.0.pre.3'
|
51
51
|
s.add_runtime_dependency 'jwt', '>= 1.5', '< 3.0'
|
52
52
|
s.add_development_dependency 'awesome_print'
|
53
53
|
s.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION)
|
@@ -29,7 +29,7 @@ module Elastic
|
|
29
29
|
# @option arguments [String] :search_suggestion_query Query to obtain suggestions (*Required*)
|
30
30
|
# @option arguments [Hash] :body
|
31
31
|
# @option body :page
|
32
|
-
# @option body [
|
32
|
+
# @option body [Hash] :filters
|
33
33
|
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
34
34
|
#
|
35
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
|
@@ -44,7 +44,6 @@ module Elastic
|
|
44
44
|
|
45
45
|
search_suggestion_query = arguments.delete(:search_suggestion_query)
|
46
46
|
body = arguments.delete(:body) || {}
|
47
|
-
|
48
47
|
headers = arguments.delete(:headers) || {}
|
49
48
|
request(
|
50
49
|
:post,
|
@@ -30,13 +30,12 @@ module Elastic
|
|
30
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
|
-
|
40
39
|
headers = arguments.delete(:headers) || {}
|
41
40
|
request(
|
42
41
|
:post,
|
@@ -28,6 +28,7 @@ module Elastic
|
|
28
28
|
# @param [Hash] arguments endpoint arguments
|
29
29
|
# @option arguments [Hash] :body
|
30
30
|
# @option body [integer] :max_crawl_depth
|
31
|
+
# @option body [boolean] :sitemap_discovery_disabled
|
31
32
|
# @option body [Array<string>] :domain_allowlist
|
32
33
|
# @option body [Array<string>] :seed_urls
|
33
34
|
# @option body [Array<string>] :sitemap_urls
|
@@ -39,7 +40,6 @@ module Elastic
|
|
39
40
|
raise ArgumentError, "Required parameter 'engine_name' missing" unless engine_name
|
40
41
|
|
41
42
|
body = arguments.delete(:body) || {}
|
42
|
-
|
43
43
|
headers = arguments.delete(:headers) || {}
|
44
44
|
request(
|
45
45
|
:post,
|