Class: UntitledApi::SearchController

Inherits:
BaseController show all
Defined in:
lib/untitled_api/controllers/search_controller.rb

Overview

SearchController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from UntitledApi::BaseController

Instance Method Details

#search_create(index) ⇒ void

This method returns an undefined value.

TODO: type endpoint description here

Parameters:

  • index (String)

    Required parameter: Example:



30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/untitled_api/controllers/search_controller.rb', line 30

def search_create(index)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/search/{index}',
                                 Server::DEFAULT)
               .template_param(new_parameter(index, key: 'index')
                                .should_encode(true))
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .is_response_void(true))
    .execute
end

#search_retrieve(index) ⇒ SearchResponse1

TODO: type endpoint description here

Parameters:

  • index (String)

    Required parameter: Example:

Returns:



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/untitled_api/controllers/search_controller.rb', line 12

def search_retrieve(index)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/{index}',
                                 Server::DEFAULT)
               .template_param(new_parameter(index, key: 'index')
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(SearchResponse1.method(:from_hash)))
    .execute
end

#search_stats_cluster_retrievevoid

This method returns an undefined value.

TODO: type endpoint description here



58
59
60
61
62
63
64
65
66
67
# File 'lib/untitled_api/controllers/search_controller.rb', line 58

def search_stats_cluster_retrieve
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/stats/cluster',
                                 Server::DEFAULT)
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .is_response_void(true))
    .execute
end

#search_stats_indices_retrieveSearchStatsIndicesResponse1

TODO: type endpoint description here

Returns:



71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/untitled_api/controllers/search_controller.rb', line 71

def search_stats_indices_retrieve
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/stats/indices',
                                 Server::DEFAULT)
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(SearchStatsIndicesResponse1.method(:from_hash)))
    .execute
end

#search_stats_nodes_retrievevoid

This method returns an undefined value.

TODO: type endpoint description here



86
87
88
89
90
91
92
93
94
95
# File 'lib/untitled_api/controllers/search_controller.rb', line 86

def search_stats_nodes_retrieve
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/stats/nodes',
                                 Server::DEFAULT)
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .is_response_void(true))
    .execute
end

#search_stats_retrievevoid

This method returns an undefined value.

TODO: type endpoint description here



45
46
47
48
49
50
51
52
53
54
# File 'lib/untitled_api/controllers/search_controller.rb', line 45

def search_stats_retrieve
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/stats',
                                 Server::DEFAULT)
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .is_response_void(true))
    .execute
end

#search_stats_shards_retrievevoid

This method returns an undefined value.

TODO: type endpoint description here



99
100
101
102
103
104
105
106
107
108
# File 'lib/untitled_api/controllers/search_controller.rb', line 99

def search_stats_shards_retrieve
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/stats/shards',
                                 Server::DEFAULT)
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .is_response_void(true))
    .execute
end

#search_stats_tasks_retrievevoid

This method returns an undefined value.

TODO: type endpoint description here



112
113
114
115
116
117
118
119
120
121
# File 'lib/untitled_api/controllers/search_controller.rb', line 112

def search_stats_tasks_retrieve
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/search/stats/tasks',
                                 Server::DEFAULT)
               .auth(Or.new('tokenAuth')))
    .response(new_response_handler
               .is_response_void(true))
    .execute
end