elastic-enterprise-search 7.12.0 → 7.14.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.10.0.beta.1.yml +12 -0
- data/.ci/make.sh +162 -0
- data/.ci/run-repository.sh +2 -0
- data/.ci/test-matrix.yml +1 -1
- data/.github/check_license_headers.rb +33 -0
- data/.github/license-header.txt +16 -0
- data/.github/workflows/license.yml +13 -0
- data/.github/workflows/testing.yml +1 -1
- data/Rakefile +1 -0
- data/docs/guide/app-search-api.asciidoc +28 -0
- data/docs/guide/connecting.asciidoc +47 -1
- data/docs/guide/release_notes/712.asciidoc +12 -10
- data/docs/guide/release_notes/713.asciidoc +21 -0
- data/docs/guide/release_notes/714.asciidoc +21 -0
- data/docs/guide/release_notes/index.asciidoc +4 -0
- data/docs/guide/workplace-search-api.asciidoc +101 -2
- data/elastic-enterprise-search.gemspec +1 -1
- data/lib/elastic/app-search/api/api_key.rb +51 -0
- data/lib/elastic/app-search/api/create_api_key.rb +49 -0
- data/lib/elastic/app-search/api/delete_api_key.rb +51 -0
- data/lib/elastic/app-search/api/list_api_keys.rb +49 -0
- data/lib/elastic/app-search/api/put_api_key.rb +52 -0
- data/lib/elastic/enterprise-search/api/put_read_only.rb +2 -0
- data/lib/elastic/enterprise-search/client.rb +0 -15
- data/lib/elastic/enterprise-search/request.rb +5 -3
- data/lib/elastic/enterprise-search/version.rb +1 -1
- data/lib/elastic/enterprise_search.rb +11 -0
- data/lib/elastic/workplace-search/api/command_sync_jobs.rb +53 -0
- data/lib/elastic/workplace-search/api/content_source.rb +49 -0
- data/lib/elastic/workplace-search/api/create_analytics_event.rb +8 -8
- data/lib/elastic/workplace-search/api/create_batch_synonym_sets.rb +50 -0
- data/lib/elastic/workplace-search/api/create_content_source.rb +54 -0
- data/lib/elastic/workplace-search/api/create_external_identity.rb +3 -1
- data/lib/elastic/workplace-search/api/current_user.rb +47 -0
- data/lib/elastic/workplace-search/api/delete_all_documents.rb +49 -0
- data/lib/elastic/workplace-search/api/delete_content_source.rb +49 -0
- data/lib/elastic/workplace-search/api/delete_documents.rb +1 -1
- data/lib/elastic/workplace-search/api/delete_documents_by_query.rb +50 -0
- data/lib/elastic/workplace-search/api/delete_synonym_set.rb +51 -0
- data/lib/elastic/workplace-search/api/document.rb +53 -0
- data/lib/elastic/workplace-search/api/list_content_sources.rb +48 -0
- data/lib/elastic/workplace-search/api/list_synonym_sets.rb +51 -0
- data/lib/elastic/workplace-search/api/put_content_source.rb +57 -0
- data/lib/elastic/workplace-search/api/put_content_source_icons.rb +53 -0
- data/lib/elastic/workplace-search/api/put_external_identity.rb +3 -1
- data/lib/elastic/workplace-search/api/put_synonym_set.rb +53 -0
- data/lib/elastic/workplace-search/api/search.rb +1 -1
- data/lib/elastic/workplace-search/api/synonym_set.rb +51 -0
- data/lib/elastic/workplace-search/workplace_search.rb +6 -1
- data/rake_tasks/unified_release_tasks.rake +46 -0
- data/spec/app-search/api_apikey_spec.rb +92 -0
- data/spec/app-search/api_spec_helper.rb +16 -0
- data/spec/enterprise-search/client_spec.rb +0 -1
- data/spec/enterprise-search/request_spec.rb +26 -0
- data/spec/fixtures/vcr/app_search/create_api_key.yml +52 -0
- data/spec/fixtures/vcr/{workplace_search/delete_external_identity.yml → app_search/delete_api_key.yml} +16 -17
- data/spec/fixtures/vcr/{workplace_search/list_permissions.yml → app_search/get_api_key.yml} +16 -17
- data/spec/fixtures/vcr/app_search/list_api_keys.yml +52 -0
- data/spec/fixtures/vcr/app_search/put_api_key.yml +52 -0
- data/spec/integration/enterprise_search_api_spec.rb +4 -0
- data/spec/integration/icon.png +0 -0
- data/spec/integration/workplace_search_spec.rb +375 -0
- data/spec/webmock_requires.rb +16 -0
- data/spec/workplace-search/client_spec.rb +24 -2
- metadata +44 -24
- data/.ci/jobs/elastic+enterprise-search-ruby+7.11.yml +0 -12
- data/spec/fixtures/vcr/workplace_search/add_user_permissions.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/clear_user_permissions.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/create_external_identity.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/delete_documents.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/index_documents.yml +0 -55
- data/spec/fixtures/vcr/workplace_search/list_external_identities.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/put_external_identity.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/put_user_permissions.yml +0 -103
- data/spec/fixtures/vcr/workplace_search/remove_user_permissions.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/retrieve_external_identity.yml +0 -53
- data/spec/fixtures/vcr/workplace_search/user_permissions_empty.yml +0 -53
- data/spec/workplace-search/documents_spec.rb +0 -80
- data/spec/workplace-search/external_identities_spec.rb +0 -84
- data/spec/workplace-search/permissions_spec.rb +0 -136
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eef7550b4a936e514eb9b0eb52272a2b445b3e54c301c7cec29039c789561ee
|
4
|
+
data.tar.gz: 47ab2fcbb9b00a3cbb219e713ee9308642345b72dcc6af5b9f0f1f334edd7c09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38a4519bfa5d4b3ea04507468b0c5ddb7122d8c5c928943b45d3d1ce120d3a1652ac7c2aff217082aaca4cdc3124b732e4f31c265bf5c6f0cdc0173672e020f0
|
7
|
+
data.tar.gz: 7cd26fe0a7fc874ccbcfb16ef443d5c9ddd69b0a882690dcbfc0b90d698a10bd89d942530ba93aae78531cddc6960721edd8d2a410728be87aacd018e1aeed31
|
@@ -0,0 +1,12 @@
|
|
1
|
+
---
|
2
|
+
- job:
|
3
|
+
name: elastic+enterprise-search-ruby+7.10.0.beta.1
|
4
|
+
display-name: 'elastic / enterprise-search-ruby # 7.10.0.beta.1'
|
5
|
+
description: Testing the enterprise-search-ruby 7.10.0.beta.1 branch.
|
6
|
+
junit_results: "*-junit.xml"
|
7
|
+
parameters:
|
8
|
+
- string:
|
9
|
+
name: branch_specifier
|
10
|
+
default: refs/heads/7.10.0.beta.1
|
11
|
+
description: the Git branch specifier to build (<branchName>, <tagName>,
|
12
|
+
<commitId>, etc.)
|
data/.ci/make.sh
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# ------------------------------------------------------- #
|
4
|
+
#
|
5
|
+
# Skeleton for common build entry script for all elastic
|
6
|
+
# clients. Needs to be adapted to individual client usage.
|
7
|
+
#
|
8
|
+
# Must be called: ./.ci/make.sh <target> <params>
|
9
|
+
#
|
10
|
+
# Version: 1.1.0
|
11
|
+
#
|
12
|
+
# Targets:
|
13
|
+
# ---------------------------
|
14
|
+
# assemble <VERSION> : build client artefacts with version
|
15
|
+
# bump <VERSION> : bump client internals to version
|
16
|
+
# codegen <VERSION> : generate endpoints
|
17
|
+
# docsgen <VERSION> : generate documentation
|
18
|
+
# examplegen : generate the doc examples
|
19
|
+
# clean : clean workspace
|
20
|
+
#
|
21
|
+
# ------------------------------------------------------- #
|
22
|
+
|
23
|
+
# ------------------------------------------------------- #
|
24
|
+
# Bootstrap
|
25
|
+
# ------------------------------------------------------- #
|
26
|
+
|
27
|
+
script_path=$(dirname "$(realpath -s "$0")")
|
28
|
+
repo=$(realpath "$script_path/../")
|
29
|
+
|
30
|
+
# shellcheck disable=SC1090
|
31
|
+
CMD=$1
|
32
|
+
TASK=$1
|
33
|
+
TASK_ARGS=()
|
34
|
+
VERSION=$2
|
35
|
+
STACK_VERSION=$VERSION
|
36
|
+
set -euo pipefail
|
37
|
+
|
38
|
+
product="elastic/enterprise-search-ruby"
|
39
|
+
output_folder=".ci/output"
|
40
|
+
codegen_folder=".ci/output"
|
41
|
+
OUTPUT_DIR="$repo/${output_folder}"
|
42
|
+
REPO_BINDING="${OUTPUT_DIR}:/sln/${output_folder}"
|
43
|
+
mkdir -p "$OUTPUT_DIR"
|
44
|
+
|
45
|
+
echo -e "\033[34;1mINFO:\033[0m PRODUCT ${product}\033[0m"
|
46
|
+
echo -e "\033[34;1mINFO:\033[0m VERSION ${STACK_VERSION}\033[0m"
|
47
|
+
echo -e "\033[34;1mINFO:\033[0m OUTPUT_DIR ${OUTPUT_DIR}\033[0m"
|
48
|
+
|
49
|
+
RUBY_TEST_VERSION=${RUBY_TEST_VERSION-2.7}
|
50
|
+
|
51
|
+
case $CMD in
|
52
|
+
clean)
|
53
|
+
echo -e "\033[36;1mTARGET: clean workspace $output_folder\033[0m"
|
54
|
+
rm -rf "$output_folder"
|
55
|
+
echo -e "\033[32;1mdone.\033[0m"
|
56
|
+
exit 0
|
57
|
+
;;
|
58
|
+
assemble)
|
59
|
+
if [ -v $VERSION ]; then
|
60
|
+
echo -e "\033[31;1mTARGET: assemble -> missing version parameter\033[0m"
|
61
|
+
exit 1
|
62
|
+
fi
|
63
|
+
echo -e "\033[36;1mTARGET: assemble artefact $VERSION\033[0m"
|
64
|
+
TASK=assemble
|
65
|
+
TASK_ARGS=("$VERSION" "$output_folder")
|
66
|
+
;;
|
67
|
+
codegen)
|
68
|
+
if [ -v $VERSION ]; then
|
69
|
+
echo -e "\033[31;1mTARGET: codegen -> missing version parameter\033[0m"
|
70
|
+
exit 1
|
71
|
+
fi
|
72
|
+
echo -e "\033[36;1mTARGET: codegen API v$VERSION\033[0m"
|
73
|
+
TASK=codegen
|
74
|
+
# VERSION is BRANCH here for now
|
75
|
+
TASK_ARGS=("$VERSION" "$codegen_folder")
|
76
|
+
;;
|
77
|
+
docsgen)
|
78
|
+
if [ -v $VERSION ]; then
|
79
|
+
echo -e "\033[31;1mTARGET: docsgen -> missing version parameter\033[0m"
|
80
|
+
exit 1
|
81
|
+
fi
|
82
|
+
echo -e "\033[36;1mTARGET: generate docs for $VERSION\033[0m"
|
83
|
+
TASK=codegen
|
84
|
+
# VERSION is BRANCH here for now
|
85
|
+
TASK_ARGS=("$VERSION" "$codegen_folder")
|
86
|
+
;;
|
87
|
+
examplesgen)
|
88
|
+
echo -e "\033[36;1mTARGET: generate examples\033[0m"
|
89
|
+
TASK=codegen
|
90
|
+
# VERSION is BRANCH here for now
|
91
|
+
TASK_ARGS=("$VERSION" "$codegen_folder")
|
92
|
+
;;
|
93
|
+
bump)
|
94
|
+
if [ -v $VERSION ]; then
|
95
|
+
echo -e "\033[31;1mTARGET: bump -> missing version parameter\033[0m"
|
96
|
+
exit 1
|
97
|
+
fi
|
98
|
+
echo -e "\033[36;1mTARGET: bump to version $VERSION\033[0m"
|
99
|
+
TASK=bump
|
100
|
+
# VERSION is BRANCH here for now
|
101
|
+
TASK_ARGS=("$VERSION")
|
102
|
+
;;
|
103
|
+
*)
|
104
|
+
echo -e "\nUsage:\n\t $CMD is not supported right now\n"
|
105
|
+
exit 1
|
106
|
+
esac
|
107
|
+
|
108
|
+
|
109
|
+
# ------------------------------------------------------- #
|
110
|
+
# Build Container
|
111
|
+
# ------------------------------------------------------- #
|
112
|
+
|
113
|
+
echo -e "\033[34;1mINFO: building $product container\033[0m"
|
114
|
+
|
115
|
+
docker build --file .ci/Dockerfile --tag ${product} \
|
116
|
+
--build-arg USER_ID="$(id -u)" \
|
117
|
+
--build-arg GROUP_ID="$(id -g)" .
|
118
|
+
|
119
|
+
|
120
|
+
# ------------------------------------------------------- #
|
121
|
+
# Run the Container
|
122
|
+
# ------------------------------------------------------- #
|
123
|
+
|
124
|
+
echo -e "\033[34;1mINFO: running $product container\033[0m"
|
125
|
+
|
126
|
+
# Convert ARGS to comma separated string for Rake:
|
127
|
+
args_string="${TASK_ARGS[*]}"
|
128
|
+
args_string="${args_string// /,}"
|
129
|
+
|
130
|
+
docker run \
|
131
|
+
--env "RUBY_TEST_VERSION=${RUBY_TEST_VERSION}" \
|
132
|
+
--name test-runner \
|
133
|
+
--volume $REPO_BINDING \
|
134
|
+
--volume $repo:/usr/src/app \
|
135
|
+
--rm \
|
136
|
+
$product \
|
137
|
+
bundle exec rake unified_release:"$TASK"["$args_string"]
|
138
|
+
|
139
|
+
# ------------------------------------------------------- #
|
140
|
+
# Post Command tasks & checks
|
141
|
+
# ------------------------------------------------------- #
|
142
|
+
|
143
|
+
if [[ "$CMD" == "assemble" ]]; then
|
144
|
+
if compgen -G ".ci/output/*" > /dev/null; then
|
145
|
+
echo -e "\033[32;1mTARGET: successfully assembled client v$VERSION\033[0m"
|
146
|
+
else
|
147
|
+
echo -e "\033[31;1mTARGET: assemble failed, empty workspace!\033[0m"
|
148
|
+
exit 1
|
149
|
+
fi
|
150
|
+
fi
|
151
|
+
|
152
|
+
if [[ "$CMD" == "codegen" ]]; then
|
153
|
+
echo "TODO"
|
154
|
+
fi
|
155
|
+
|
156
|
+
if [[ "$CMD" == "docsgen" ]]; then
|
157
|
+
echo "TODO"
|
158
|
+
fi
|
159
|
+
|
160
|
+
if [[ "$CMD" == "examplesgen" ]]; then
|
161
|
+
echo "TODO"
|
162
|
+
fi
|
data/.ci/run-repository.sh
CHANGED
@@ -14,6 +14,7 @@ set -euo pipefail
|
|
14
14
|
|
15
15
|
echo -e "\033[34;1mINFO:\033[0m VERSION: ${STACK_VERSION}\033[0m"
|
16
16
|
echo -e "\033[34;1mINFO:\033[0m TEST_SUITE: ${TEST_SUITE}\033[0m"
|
17
|
+
echo -e "\033[34;1mINFO:\033[0m RUBY_VERSION: ${RUBY_VERSION}\033[0m"
|
17
18
|
echo -e "\033[34;1mINFO:\033[0m RUNSCRIPTS: ${RUNSCRIPTS}\033[0m"
|
18
19
|
echo -e "\033[34;1mINFO:\033[0m URL: ${elasticsearch_url}\033[0m"
|
19
20
|
|
@@ -33,6 +34,7 @@ echo -e "\033[32;1mBUILD: \033[31mRuby \e[0m container.\033[0m"
|
|
33
34
|
docker build \
|
34
35
|
--file .ci/Dockerfile \
|
35
36
|
--tag elastic/enterprise-search-ruby \
|
37
|
+
--build-arg RUBY_VERSION=${RUBY_VERSION} \
|
36
38
|
.
|
37
39
|
|
38
40
|
echo -e "\033[32;1mRUN: \033[31mRuby \e[0m container.\033[0m"
|
data/.ci/test-matrix.yml
CHANGED
@@ -0,0 +1,33 @@
|
|
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
|
+
LICENSE = File.read('./.github/license-header.txt')
|
19
|
+
files = `git ls-files | grep -E '\.rb|Rakefile|\.rake|\.erb|Gemfile|gemspec'`.split("\n")
|
20
|
+
errors = []
|
21
|
+
|
22
|
+
files.each do |file|
|
23
|
+
unless File.read(file).include?(LICENSE)
|
24
|
+
errors << file
|
25
|
+
puts "#{file} doesn't contain the correct license header"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
if errors.empty?
|
30
|
+
puts 'All checked files have the correct license header'
|
31
|
+
else
|
32
|
+
exit 1
|
33
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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.
|
@@ -0,0 +1,13 @@
|
|
1
|
+
name: License headers
|
2
|
+
on: [pull_request]
|
3
|
+
jobs:
|
4
|
+
build:
|
5
|
+
runs-on: ubuntu-latest
|
6
|
+
steps:
|
7
|
+
- uses: actions/checkout@v2
|
8
|
+
- uses: ruby/setup-ruby@v1
|
9
|
+
with:
|
10
|
+
ruby-version: 3
|
11
|
+
- name: Check license headers
|
12
|
+
run: |
|
13
|
+
ruby ./.github/check_license_headers.rb
|
data/Rakefile
CHANGED
@@ -146,6 +146,34 @@ client.list_curations(engine_name)
|
|
146
146
|
client.delete_curation(engine_name, curation_id: 'cur-id')
|
147
147
|
----------------------------
|
148
148
|
|
149
|
+
=== Api Key
|
150
|
+
|
151
|
+
[source,rb]
|
152
|
+
----------------------------
|
153
|
+
# Create API Key
|
154
|
+
body = {
|
155
|
+
name: name,
|
156
|
+
type: 'private',
|
157
|
+
read: true,
|
158
|
+
write: true,
|
159
|
+
access_all_engines: true
|
160
|
+
}
|
161
|
+
response = client.create_api_key(body: body)
|
162
|
+
|
163
|
+
# Get the details of an API Key
|
164
|
+
client.api_key(api_key_name: name)
|
165
|
+
|
166
|
+
# List API Keys
|
167
|
+
client.list_api_keys
|
168
|
+
|
169
|
+
# Update an API Key
|
170
|
+
body = { name: name, type: 'private', read: true, write: true, engines: ['test'] }
|
171
|
+
client.put_api_key(api_key_name: name, body: body)
|
172
|
+
|
173
|
+
# Delete an API Key
|
174
|
+
client.delete_api_key(api_key_name: name)
|
175
|
+
----------------------------
|
176
|
+
|
149
177
|
=== Other API Endpoints
|
150
178
|
|
151
179
|
[source,rb]
|
@@ -87,7 +87,13 @@ client.search(engine_name, query: 'jungle')
|
|
87
87
|
[[auth-ws]]
|
88
88
|
==== Authenticating with Workplace Search
|
89
89
|
|
90
|
-
|
90
|
+
Workplace Search supports multiple authentication methods:
|
91
|
+
|
92
|
+
[discrete]
|
93
|
+
[[access-tokens]]
|
94
|
+
===== Workplace Search admin user access tokens
|
95
|
+
|
96
|
+
In your Elastic Workplace Search dashboard navigate to _Sources/Add a Shared Content Source_ and select _Custom API Source_ to create a new source. Name your source (e.g. `Enterprise Search Ruby Client`) and once it's created you'll get an `access token` and an `ID`.
|
91
97
|
|
92
98
|
The Workplace Search client can be accessed from an existing Enterprise Search Client, or you can initialize a new one. If you instantiate the Workplace Search client from an existing Enterprise Search Client, it's going to share the HTTP transport instance, so it's going to connect to the same host, which is a common scenario. However, if you want to connect to a different host, you should instantiate a new Workplace Client on its own:
|
93
99
|
|
@@ -109,6 +115,46 @@ workplace_search_client = Elastic::EnterpriseSearch::WorkplaceSearch::Client.new
|
|
109
115
|
)
|
110
116
|
----------------------------
|
111
117
|
|
118
|
+
[discrete]
|
119
|
+
[[basic-auth]]
|
120
|
+
===== Basic Authentication
|
121
|
+
|
122
|
+
Workplace Search APIs support basic authentication headers to authenticate users. All Workplace Search APIs support basic authentication:
|
123
|
+
|
124
|
+
[source,rb]
|
125
|
+
----------------------------
|
126
|
+
host = 'https://id.ent-search.europe-west2.gcp.elastic-cloud.com'
|
127
|
+
basic_auth = { user: 'enterprise_search', password: 'changeme' }
|
128
|
+
|
129
|
+
workplace_search_client = Elastic::EnterpriseSearch::WorkplaceSearch::Client.new(
|
130
|
+
host: host,
|
131
|
+
http_auth: basic_auth
|
132
|
+
)
|
133
|
+
----------------------------
|
134
|
+
|
135
|
+
[discrete]
|
136
|
+
[[es-tokens]]
|
137
|
+
===== Elasticsearch tokens
|
138
|
+
|
139
|
+
Workplace Search APIs support Elasticsearch tokens generated by the Elasticsearch Token Service. All Workplace Search APIs support Elasticsearch tokens as an authentication method.
|
140
|
+
|
141
|
+
[source,rb]
|
142
|
+
----------------------------
|
143
|
+
host = 'https://id.ent-search.europe-west2.gcp.elastic-cloud.com'
|
144
|
+
access_token = '<access token>'
|
145
|
+
|
146
|
+
workplace_search_client = Elastic::EnterpriseSearch::WorkplaceSearch::Client.new(
|
147
|
+
host: host,
|
148
|
+
http_auth: access_token
|
149
|
+
)
|
150
|
+
----------------------------
|
151
|
+
|
152
|
+
[discrete]
|
153
|
+
[[ws-oauth]]
|
154
|
+
===== Workplace Search OAuth access tokens
|
155
|
+
|
156
|
+
The Search API and the Analytics Events API support user access tokens generated by the Workplace Search OAuth Service. The token is acquired via an OAuth authorization flow. User access tokens are meant to be used for Custom Search Experiences. Check <<ws-oauth-authentication>>.
|
157
|
+
|
112
158
|
[discrete]
|
113
159
|
[[custom_headers]]
|
114
160
|
=== Custom HTTP Headers
|
@@ -1,6 +1,18 @@
|
|
1
1
|
[[release_notes_712]]
|
2
|
+
=== 7.12 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
[[release_notes_7121]]
|
6
|
+
=== 7.12.1 Release notes
|
7
|
+
|
8
|
+
- Elastic Transport: Locks dependency version to < 7.14
|
9
|
+
- Elastic Transport: Adds ENTERPRISE_SERVICE_VERSION constant for compatibility
|
10
|
+
|
11
|
+
[discrete]
|
12
|
+
[[release_notes_7120]]
|
2
13
|
=== 7.12.0 Release notes
|
3
14
|
|
15
|
+
|
4
16
|
[discrete]
|
5
17
|
==== General
|
6
18
|
|
@@ -14,13 +26,3 @@
|
|
14
26
|
|
15
27
|
- Updates source code documentation for `current_page` and `page_size` parameters from type `String` to `Integer`.
|
16
28
|
- In `multi_search`, the body parameter is renamed to `body` from `queries` to avoid repetition and potential confusion.
|
17
|
-
|
18
|
-
[discrete]
|
19
|
-
==== Workplace Search
|
20
|
-
|
21
|
-
- Body parameter renamed to `document_ids` in `delete_documents`:
|
22
|
-
|
23
|
-
[source,rb]
|
24
|
-
----------------------------
|
25
|
-
client.delete_documents(content_source_id, document_ids: ['e68fbc2688f1', 'c535e226aee3'])
|
26
|
-
----------------------------
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[[release_notes_713]]
|
2
|
+
=== 7.13.0 Release notes
|
3
|
+
|
4
|
+
[discrete]
|
5
|
+
==== General
|
6
|
+
|
7
|
+
- Tested with Elastic Enterprise Search API version 7.13.0.
|
8
|
+
- Improved meta header implementation for Elastic Cloud.
|
9
|
+
|
10
|
+
[discrete]
|
11
|
+
==== Workplace Search
|
12
|
+
|
13
|
+
* The client now supports Basic Authentication and Elasticsearch tokens. All Workplace Search APIs support Basic Authentication, Elasticsearch tokens and Workplace Search admin user access tokens as an authentication method. You still need to set up user access tokens generated by the Workplace Search OAuth Service for the Search API and the Analytics Events API.
|
14
|
+
* New APIs:
|
15
|
+
** `document`: Retrieve a document by ID from a specified content source.
|
16
|
+
** `delete_all_documents`: Delete all documents for a given content source
|
17
|
+
** `content_source`: Retrieves a content source by ID
|
18
|
+
** `create_content_source`: Creates a custom content source
|
19
|
+
** `delete_content_source`: Deletes a content source by ID
|
20
|
+
** `list_content_sources`: Retrieves all content sources
|
21
|
+
** `put_content_source`: Updates a custom content source
|