File tree Expand file tree Collapse file tree 3 files changed +10
-25
lines changed
elasticsearch-xpack/lib/elasticsearch/xpack/api/actions Expand file tree Collapse file tree 3 files changed +10
-25
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,8 @@ def search(arguments = {})
42
42
43
43
_index = arguments . delete ( :index )
44
44
45
- method = if arguments [ :body ]
46
- Elasticsearch ::API ::HTTP_POST
47
- else
48
- Elasticsearch ::API ::HTTP_GET
49
- end
50
-
51
- path = "#{ Elasticsearch ::API ::Utils . __listify ( _index ) } /_eql/search"
45
+ method = Elasticsearch ::API ::HTTP_POST
46
+ path = "#{ Elasticsearch ::API ::Utils . __listify ( _index ) } /_eql/search"
52
47
params = Elasticsearch ::API ::Utils . __validate_and_extract_params arguments , ParamsRegistry . get ( __method__ )
53
48
54
49
body = arguments [ :body ]
Original file line number Diff line number Diff line change @@ -48,17 +48,12 @@ def rollup_search(arguments = {})
48
48
49
49
_type = arguments . delete ( :type )
50
50
51
- method = if arguments [ :body ]
52
- Elasticsearch ::API ::HTTP_POST
51
+ method = Elasticsearch ::API ::HTTP_POST
52
+ path = if _index && _type
53
+ "#{ Elasticsearch ::API ::Utils . __listify ( _index ) } /#{ Elasticsearch ::API ::Utils . __listify ( _type ) } /_rollup_search"
53
54
else
54
- Elasticsearch ::API ::HTTP_GET
55
+ " #{ Elasticsearch ::API ::Utils . __listify ( _index ) } /_rollup_search"
55
56
end
56
-
57
- path = if _index && _type
58
- "#{ Elasticsearch ::API ::Utils . __listify ( _index ) } /#{ Elasticsearch ::API ::Utils . __listify ( _type ) } /_rollup_search"
59
- else
60
- "#{ Elasticsearch ::API ::Utils . __listify ( _index ) } /_rollup_search"
61
- end
62
57
params = Elasticsearch ::API ::Utils . __validate_and_extract_params arguments , ParamsRegistry . get ( __method__ )
63
58
64
59
body = arguments [ :body ]
Original file line number Diff line number Diff line change @@ -37,17 +37,12 @@ def has_privileges(arguments = {})
37
37
38
38
_user = arguments . delete ( :user )
39
39
40
- method = if arguments [ :body ]
41
- Elasticsearch ::API ::HTTP_POST
40
+ method = Elasticsearch ::API ::HTTP_POST
41
+ path = if _user
42
+ "_security/user/#{ Elasticsearch ::API ::Utils . __listify ( _user ) } /_has_privileges"
42
43
else
43
- Elasticsearch :: API :: HTTP_GET
44
+ "_security/user/_has_privileges"
44
45
end
45
-
46
- path = if _user
47
- "_security/user/#{ Elasticsearch ::API ::Utils . __listify ( _user ) } /_has_privileges"
48
- else
49
- "_security/user/_has_privileges"
50
- end
51
46
params = { }
52
47
53
48
body = arguments [ :body ]
You can’t perform that action at this time.
0 commit comments