elastic-enterprise-search 7.15.0 → 7.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ci/test-matrix.yml +2 -2
- data/.github/compatibility/Gemfile +23 -0
- data/.github/workflows/compatibility.yml +20 -0
- data/.github/workflows/testing.yml +2 -2
- data/docs/guide/release_notes/714.asciidoc +12 -0
- data/docs/guide/release_notes/715.asciidoc +12 -0
- data/docs/guide/release_notes/716.asciidoc +16 -0
- data/docs/guide/release_notes/717.asciidoc +9 -0
- data/docs/guide/release_notes/index.asciidoc +4 -0
- data/docs/guide/workplace-search-api.asciidoc +3 -0
- data/elastic-enterprise-search.gemspec +1 -1
- data/lib/elastic/enterprise-search/client.rb +12 -1
- data/lib/elastic/enterprise-search/version.rb +1 -1
- data/lib/elastic/workplace-search/api/list_documents.rb +55 -0
- data/spec/integration/app-search/api_key_spec.rb +1 -1
- data/spec/integration/app-search/api_logs_spec.rb +2 -2
- data/spec/integration/app-search/app_search_helper.rb +13 -1
- data/spec/integration/app-search/count_analytics_spec.rb +1 -1
- data/spec/integration/app-search/crawl_requests_spec.rb +1 -1
- data/spec/integration/app-search/crawler_crawl_rule_spec.rb +1 -1
- data/spec/integration/app-search/crawler_domain_spec.rb +1 -1
- data/spec/integration/app-search/crawler_entry_point_spec.rb +2 -14
- data/spec/integration/app-search/crawler_metrics_spec.rb +1 -1
- data/spec/integration/app-search/crawler_overview_spec.rb +1 -1
- data/spec/integration/app-search/crawler_process_crawl_denied_urls_spec.rb +1 -1
- data/spec/integration/app-search/crawler_process_crawl_spec.rb +1 -1
- data/spec/integration/app-search/crawler_scheduling_spec.rb +2 -14
- data/spec/integration/app-search/crawler_sitemap_spec.rb +1 -1
- data/spec/integration/app-search/crawler_urls_spec.rb +1 -1
- data/spec/integration/app-search/curations_spec.rb +1 -1
- data/spec/integration/app-search/documents_spec.rb +1 -1
- data/spec/integration/app-search/engines_spec.rb +2 -1
- data/spec/integration/app-search/log_clickthrough_spec.rb +1 -1
- data/spec/integration/app-search/query_suggestion_spec.rb +1 -1
- data/spec/integration/app-search/schema_spec.rb +1 -1
- data/spec/integration/app-search/search_and_multiple_search_spec.rb +1 -1
- data/spec/integration/app-search/search_settings_spec.rb +1 -1
- data/spec/integration/app-search/synonyms_spec.rb +1 -1
- data/spec/integration/app-search/top_clicks_analytics_spec.rb +1 -1
- data/spec/integration/app-search/top_queries_analytics_spec.rb +1 -1
- data/spec/integration/workplace-search/documents_spec.rb +7 -0
- metadata +12 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b57d38a9d4bae9ccd2217e1bd94a06b886a394aafef47a15ba645694404f3183
|
4
|
+
data.tar.gz: 3f122a3a3400a56afa448de6d3047df37e897867a2a23be1f24026d76fb31e00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 941c3d7645c1126a267662abaf62993581224ef333ad1c6552b52dbeb24508837362afc6f0c6d030e3043567eaebe2b5caa2972571d2610461f15d7f1cf1c88e
|
7
|
+
data.tar.gz: e85bab13059c21cdade084f4eb6e676be6d091db4b5d8e44326bfa8256b19e76af630ee41d28ecc5ec0a0c52febec826d8fc628d1205d598703b5a2167102363
|
data/.ci/test-matrix.yml
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
|
18
|
+
# frozen_string_literal: true
|
19
|
+
|
20
|
+
source 'https://rubygems.org'
|
21
|
+
|
22
|
+
gem 'elasticsearch', ENV['es-version']
|
23
|
+
gem 'elastic-enterprise-search', path: File.expand_path('../../', __dir__)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: Compatibility with Elasticsearch
|
2
|
+
on: [push, pull_request]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
elasticsearch:
|
6
|
+
env:
|
7
|
+
ES_VERSION: ${{ matrix.es_version }}
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
es_version: [ 7.11, 7.12, 7.13, 7.14, 7.15, 7.16 ]
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 3.1
|
17
|
+
- name: Build Gemfile with Elasticsearch gem
|
18
|
+
run: |
|
19
|
+
ruby -v
|
20
|
+
cd ./.github/compatibility/ && bundle
|
@@ -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]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
[[release_notes_716]]
|
2
|
+
=== 7.16 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
==== General
|
6
|
+
|
7
|
+
- Tested with Elastic Enterprise Search API version 7.16.0.
|
8
|
+
|
9
|
+
[discrete]
|
10
|
+
==== App Search
|
11
|
+
|
12
|
+
- Adds Adaptive Relevance APIs. The adaptive relevance API is a **beta** feature. Beta features are subject to change and are not covered by the support SLA of general release (GA) features. Elastic plans to promote this feature to GA in a future release. The adaptive relevance API is not available at all Elastic subscription levels. Refer to the Elastic subscriptions pages for https://www.elastic.co/subscriptions/cloud[Elastic Cloud] and https://www.elastic.co/subscriptions[self-managed] deployments: `adaptive_relevance_settings`, `adaptive_relevance_suggestions`, `list adaptive_relevance_suggestions`, `put_adaptive_relevance_settings`, `put_adaptive_relevance_suggestions`.
|
13
|
+
- Adds `list_crawler_domains` - Returns a list of crawler domains
|
14
|
+
|
15
|
+
==== Workplace Search
|
16
|
+
- Adds `list_documents` - List documents from a custom content source
|
@@ -5,6 +5,8 @@
|
|
5
5
|
[discrete]
|
6
6
|
=== 7.x
|
7
7
|
|
8
|
+
* <<release_notes_717, 7.17.0 Release Notes>>
|
9
|
+
* <<release_notes_716, 7.16.0 Release Notes>>
|
8
10
|
* <<release_notes_715, 7.15.0 Release Notes>>
|
9
11
|
* <<release_notes_714, 7.14.0 Release Notes>>
|
10
12
|
* <<release_notes_713, 7.13.0 Release Notes>>
|
@@ -12,6 +14,8 @@
|
|
12
14
|
* <<release_notes_711, 7.11.0 Release Notes>>
|
13
15
|
* <<release_notes_710, 7.10.0.beta.1 Release Notes>>
|
14
16
|
|
17
|
+
include::717.asciidoc[]
|
18
|
+
include::716.asciidoc[]
|
15
19
|
include::715.asciidoc[]
|
16
20
|
include::714.asciidoc[]
|
17
21
|
include::713.asciidoc[]
|
@@ -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
|
|
@@ -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 'elasticsearch-transport', '
|
50
|
+
s.add_dependency 'elasticsearch-transport', '>= 7.11'
|
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)
|
@@ -67,7 +67,7 @@ module Elastic
|
|
67
67
|
|
68
68
|
def transport
|
69
69
|
@options[:transport] ||
|
70
|
-
|
70
|
+
transport_klass.new(
|
71
71
|
host: host,
|
72
72
|
log: log,
|
73
73
|
logger: logger,
|
@@ -110,6 +110,17 @@ module Elastic
|
|
110
110
|
|
111
111
|
@options[:host]
|
112
112
|
end
|
113
|
+
|
114
|
+
private
|
115
|
+
|
116
|
+
def transport_klass
|
117
|
+
case Elasticsearch::Transport::VERSION
|
118
|
+
when /7\.1[123]/
|
119
|
+
Elasticsearch::Client
|
120
|
+
else
|
121
|
+
Elasticsearch::Transport::Client
|
122
|
+
end
|
123
|
+
end
|
113
124
|
end
|
114
125
|
end
|
115
126
|
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
4
|
+
# license agreements. See the NOTICE file distributed with
|
5
|
+
# this work for additional information regarding copyright
|
6
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
7
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
8
|
+
# not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing,
|
14
|
+
# software distributed under the License is distributed on an
|
15
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
16
|
+
# KIND, either express or implied. See the License for the
|
17
|
+
# specific language governing permissions and limitations
|
18
|
+
# under the License.
|
19
|
+
|
20
|
+
module Elastic
|
21
|
+
module EnterpriseSearch
|
22
|
+
module WorkplaceSearch
|
23
|
+
module Actions
|
24
|
+
# Documents - Lists documents from a custom content source
|
25
|
+
# Lists documents from a custom content source
|
26
|
+
#
|
27
|
+
# @param content_source_id [String] Unique ID for a Custom API source, provided upon creation of a Custom API Source (*Required*)
|
28
|
+
# @param arguments [Hash] endpoint arguments
|
29
|
+
# @option arguments [Hash] :body
|
30
|
+
# @option body [Object] :page Paging controls for the result set
|
31
|
+
# @option body :filters
|
32
|
+
# @option body :sort
|
33
|
+
# @option body [String] :cursor
|
34
|
+
# @option arguments [Hash] :headers optional HTTP headers to send with the request
|
35
|
+
#
|
36
|
+
# @see https://www.elastic.co/guide/en/workplace-search/current/workplace-search-custom-sources-api.html#list-documents
|
37
|
+
#
|
38
|
+
def list_documents(content_source_id, arguments = {})
|
39
|
+
raise ArgumentError, "Required parameter 'content_source_id' missing" unless content_source_id
|
40
|
+
|
41
|
+
body = arguments.delete(:body) || {}
|
42
|
+
headers = arguments.delete(:headers) || {}
|
43
|
+
|
44
|
+
request(
|
45
|
+
:post,
|
46
|
+
"api/ws/v1/sources/#{content_source_id}/documents/",
|
47
|
+
arguments,
|
48
|
+
body,
|
49
|
+
headers
|
50
|
+
)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -66,7 +66,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
66
66
|
engine_name = 'update-engine'
|
67
67
|
body = { name: key_name, type: 'private', read: true, write: true, access_all_engines: true }
|
68
68
|
client.create_api_key(body: body)
|
69
|
-
|
69
|
+
create_engine(engine_name)
|
70
70
|
|
71
71
|
body = { name: key_name, type: 'private', read: true, write: true, engines: [engine_name] }
|
72
72
|
attempts = 0
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:api_key_name) { 'logs-api-key' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
# Create API Key Client to log events:
|
30
30
|
body = { name: api_key_name, type: 'private', read: true, write: true, access_all_engines: true }
|
31
31
|
api_key = client.create_api_key(body: body).body['key']
|
@@ -39,7 +39,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
after do
|
42
|
-
|
42
|
+
delete_engines
|
43
43
|
client.delete_api_key(api_key_name: api_key_name)
|
44
44
|
end
|
45
45
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
# frozen_string_literal: true
|
19
19
|
|
20
20
|
require 'spec_helper'
|
21
|
+
require 'logger'
|
21
22
|
|
22
23
|
# App Search Integration tests Client Configuration
|
23
24
|
def client
|
@@ -34,6 +35,17 @@ def delete_engines
|
|
34
35
|
engines = client.list_engines.body['results']
|
35
36
|
engines.each do |engine|
|
36
37
|
client.delete_engine(engine['name'])
|
38
|
+
# Gives time to the server to sync:
|
39
|
+
sleep 2
|
37
40
|
end
|
38
|
-
|
41
|
+
end
|
42
|
+
|
43
|
+
def create_engine(name)
|
44
|
+
client.create_engine(name: name)
|
45
|
+
rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e
|
46
|
+
raise e unless e.message.match(/Name is already taken/)
|
47
|
+
|
48
|
+
Logger.new($stdout).info("Engine '#{name}' had already been created, giving time for the server to sync.")
|
49
|
+
sleep 5
|
50
|
+
client.create_engine(name: name)
|
39
51
|
end
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -25,26 +25,14 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
29
|
-
loop do
|
30
|
-
attempts += 1
|
31
|
-
client.create_engine(name: engine_name)
|
32
|
-
break if attempts > 9
|
33
|
-
rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e
|
34
|
-
if e.message.match?(/Name is already taken/)
|
35
|
-
sleep 1
|
36
|
-
next
|
37
|
-
end
|
38
|
-
else
|
39
|
-
break
|
40
|
-
end
|
28
|
+
create_engine(engine_name)
|
41
29
|
body = { name: name }
|
42
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
43
31
|
@domain = response.body
|
44
32
|
end
|
45
33
|
|
46
34
|
after do
|
47
|
-
|
35
|
+
delete_engines
|
48
36
|
end
|
49
37
|
|
50
38
|
it 'creates an entry point' do
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -26,26 +26,14 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
26
26
|
let(:name) { 'https://www.elastic.co' }
|
27
27
|
|
28
28
|
before do
|
29
|
-
|
30
|
-
loop do
|
31
|
-
attempts += 1
|
32
|
-
client.create_engine(name: engine_name)
|
33
|
-
break if attempts > 9
|
34
|
-
rescue Elasticsearch::Transport::Transport::Errors::BadRequest => e
|
35
|
-
if e.message.match?(/Name is already taken/)
|
36
|
-
sleep 1
|
37
|
-
next
|
38
|
-
end
|
39
|
-
else
|
40
|
-
break
|
41
|
-
end
|
29
|
+
create_engine(engine_name)
|
42
30
|
body = { name: name }
|
43
31
|
response = client.create_crawler_domain(engine_name, body: body)
|
44
32
|
@domain = response.body
|
45
33
|
end
|
46
34
|
|
47
35
|
after do
|
48
|
-
|
36
|
+
delete_engines
|
49
37
|
end
|
50
38
|
|
51
39
|
it 'sets a crawl schedule' do
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -25,7 +25,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
25
25
|
let(:name) { 'https://www.elastic.co' }
|
26
26
|
|
27
27
|
before do
|
28
|
-
|
28
|
+
create_engine(engine_name)
|
29
29
|
body = { name: name }
|
30
30
|
response = client.create_crawler_domain(engine_name, body: body)
|
31
31
|
@domain = response.body
|
@@ -24,7 +24,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
24
24
|
let(:engine_name) { 'books' }
|
25
25
|
|
26
26
|
before do
|
27
|
-
|
27
|
+
create_engine(engine_name)
|
28
28
|
documents = [
|
29
29
|
{ title: 'Jungle Tales', author: 'Horacio Quiroga' },
|
30
30
|
{ title: 'The Jungle Book', author: 'Rudyard Kipling' }
|
@@ -58,9 +58,9 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'retrieves an engine by name' do
|
61
|
+
engine_name = 'retrieve-engine'
|
61
62
|
client.create_engine(name: engine_name)
|
62
63
|
response = client.engine(engine_name)
|
63
|
-
|
64
64
|
expect(response.status).to eq 200
|
65
65
|
expect(response.body).to eq(
|
66
66
|
{ 'name' => engine_name, 'type' => 'default', 'language' => nil, 'document_count' => 0 }
|
@@ -68,6 +68,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it 'deletes an engine' do
|
71
|
+
engine_name = 'delete-engine'
|
71
72
|
client.create_engine(name: engine_name)
|
72
73
|
response = client.delete_engine(engine_name)
|
73
74
|
expect(response.status).to eq 200
|
@@ -23,7 +23,7 @@ describe Elastic::EnterpriseSearch::AppSearch::Client do
|
|
23
23
|
let(:engine_name) { 'schema' }
|
24
24
|
|
25
25
|
before do
|
26
|
-
|
26
|
+
create_engine(engine_name)
|
27
27
|
client.index_documents(engine_name, documents: [{ title: 'test', director: 'someone' }])
|
28
28
|
end
|
29
29
|
|
@@ -67,6 +67,13 @@ describe Elastic::EnterpriseSearch::WorkplaceSearch::Client do
|
|
67
67
|
expect(response.body['id']).to eq document_id
|
68
68
|
end
|
69
69
|
|
70
|
+
it 'Lists documents in a content source' do
|
71
|
+
response = client.list_documents(content_source_id)
|
72
|
+
expect(response.status).to eq 200
|
73
|
+
expect(response.body['results'])
|
74
|
+
expect(response.body['meta'])
|
75
|
+
end
|
76
|
+
|
70
77
|
it 'Deletes all documents in a content source' do
|
71
78
|
response = client.delete_all_documents(content_source_id)
|
72
79
|
expect(response.status).to eq 200
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elastic-enterprise-search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fernando Briano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: elasticsearch-transport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 7.
|
19
|
+
version: '7.11'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 7.
|
26
|
+
version: '7.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: jwt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,7 +175,9 @@ files:
|
|
175
175
|
- ".ci/run-tests"
|
176
176
|
- ".ci/test-matrix.yml"
|
177
177
|
- ".github/check_license_headers.rb"
|
178
|
+
- ".github/compatibility/Gemfile"
|
178
179
|
- ".github/license-header.txt"
|
180
|
+
- ".github/workflows/compatibility.yml"
|
179
181
|
- ".github/workflows/license.yml"
|
180
182
|
- ".github/workflows/rubocop.yml"
|
181
183
|
- ".github/workflows/testing.yml"
|
@@ -199,6 +201,8 @@ files:
|
|
199
201
|
- docs/guide/release_notes/713.asciidoc
|
200
202
|
- docs/guide/release_notes/714.asciidoc
|
201
203
|
- docs/guide/release_notes/715.asciidoc
|
204
|
+
- docs/guide/release_notes/716.asciidoc
|
205
|
+
- docs/guide/release_notes/717.asciidoc
|
202
206
|
- docs/guide/release_notes/index.asciidoc
|
203
207
|
- docs/guide/workplace-search-api.asciidoc
|
204
208
|
- elastic-enterprise-search.gemspec
|
@@ -310,6 +314,7 @@ files:
|
|
310
314
|
- lib/elastic/workplace-search/api/external_identity.rb
|
311
315
|
- lib/elastic/workplace-search/api/index_documents.rb
|
312
316
|
- lib/elastic/workplace-search/api/list_content_sources.rb
|
317
|
+
- lib/elastic/workplace-search/api/list_documents.rb
|
313
318
|
- lib/elastic/workplace-search/api/list_external_identities.rb
|
314
319
|
- lib/elastic/workplace-search/api/list_permissions.rb
|
315
320
|
- lib/elastic/workplace-search/api/list_synonym_sets.rb
|
@@ -401,7 +406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
401
406
|
- !ruby/object:Gem::Version
|
402
407
|
version: '0'
|
403
408
|
requirements: []
|
404
|
-
rubygems_version: 3.
|
409
|
+
rubygems_version: 3.3.3
|
405
410
|
signing_key:
|
406
411
|
specification_version: 4
|
407
412
|
summary: Official API client for Elastic Enterprise Search
|