Skip to content

Commit 5d9964d

Browse files
committed
[API] security.search_user_profiles renamed to security.suggest_user_profiles
1 parent 18ac365 commit 5d9964d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/security/search_user_profiles.rb renamed to elasticsearch-api/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ module Elasticsearch
1919
module API
2020
module Security
2121
module Actions
22-
# Searches for user profiles that match specified criteria.
22+
# Get suggestions for user profiles that match specified search criteria.
2323
# This functionality is Experimental and may be changed or removed
2424
# completely in a future release. Elastic will take a best effort approach
2525
# to fix any issues, but experimental features are not subject to the
2626
# support SLA of official GA features.
2727
#
2828
# @option arguments [List] :data A comma-separated list of keys for which the corresponding application data are retrieved.
2929
# @option arguments [Hash] :headers Custom HTTP headers
30-
# @option arguments [Hash] :body The search definition for user profiles
30+
# @option arguments [Hash] :body The suggestion definition for user profiles
3131
#
32-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-search-user-profile.html
32+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/security-api-suggest-user-profile.html
3333
#
34-
def search_user_profiles(arguments = {})
34+
def suggest_user_profiles(arguments = {})
3535
arguments = arguments.clone
3636
headers = arguments.delete(:headers) || {}
3737

@@ -43,7 +43,7 @@ def search_user_profiles(arguments = {})
4343
Elasticsearch::API::HTTP_GET
4444
end
4545

46-
path = "_security/profile/_search"
46+
path = "_security/profile/_suggest"
4747
params = Utils.process_params(arguments)
4848

4949
Elasticsearch::API::Response.new(

elasticsearch-api/spec/elasticsearch/api/actions/security/search_user_profiles_spec.rb renamed to elasticsearch-api/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
let(:expected_args) do
2222
[
2323
method,
24-
'_security/profile/_search',
24+
'_security/profile/_suggest',
2525
{},
2626
body,
2727
{}
@@ -31,15 +31,15 @@
3131
let(:body) { nil }
3232

3333
it 'performs the request' do
34-
expect(client_double.security.search_user_profiles).to be_a Elasticsearch::API::Response
34+
expect(client_double.security.suggest_user_profiles).to be_a Elasticsearch::API::Response
3535
end
3636

3737
context 'when there is a body parameter' do
3838
let(:method) { 'POST' }
3939
let(:body) { {} }
4040

4141
it 'performs the request' do
42-
expect(client_double.security.search_user_profiles(body: {})).to be_a Elasticsearch::API::Response
42+
expect(client_double.security.suggest_user_profiles(body: {})).to be_a Elasticsearch::API::Response
4343
end
4444
end
4545
end

0 commit comments

Comments
 (0)