Module: ElasticSearch::Transport::IndexAdminProtocol
- Included in:
- BaseProtocol
- Defined in:
- lib/elasticsearch/transport/base_protocol.rb
Instance Method Summary collapse
- #alias_index(operations, options = {}) ⇒ Object
- #create_index(index, create_options = {}, options = {}) ⇒ Object
- #create_river(type, create_options = {}, options = {}) ⇒ Object
- #delete_index(index, options = {}) ⇒ Object
- #delete_mapping(index, type, options = {}) ⇒ Object
- #delete_river(type, options = {}) ⇒ Object
- #flush(index_list, options = {}) ⇒ Object
- #get_aliases(index, options = {}) ⇒ Object
- #get_river(type, options = {}) ⇒ Object
- #get_settings(index, options) ⇒ Object
- #index_mapping(index_list, options = {}) ⇒ Object
- #index_status(index_list, options = {}) ⇒ Object
- #optimize(index_list, options = {}) ⇒ Object
- #refresh(index_list, options = {}) ⇒ Object
- #river_status(type, options = {}) ⇒ Object
- #snapshot(index_list, options = {}) ⇒ Object
- #update_mapping(index, type, mapping, options) ⇒ Object
- #update_settings(index, settings, options) ⇒ Object
Instance Method Details
#alias_index(operations, options = {}) ⇒ Object
122 123 124 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 122 def alias_index(operations, ={}) standard_request(:post, {:op => "_aliases"}, {}, encoder.encode(operations)) end |
#create_index(index, create_options = {}, options = {}) ⇒ Object
114 115 116 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 114 def create_index(index, ={}, ={}) standard_request(:put, {:index => index}, {}, encoder.encode()) end |
#create_river(type, create_options = {}, options = {}) ⇒ Object
166 167 168 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 166 def create_river(type, ={}, ={}) standard_request(:put, {:index => "_river", :type => type, :op => "_meta"}, , encoder.encode()) end |
#delete_index(index, options = {}) ⇒ Object
118 119 120 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 118 def delete_index(index, ={}) standard_request(:delete, {:index => index}) end |
#delete_mapping(index, type, options = {}) ⇒ Object
138 139 140 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 138 def delete_mapping(index, type, ={}) standard_request(:delete, {:index => index, :type => type, :op => "_mapping"}) end |
#delete_river(type, options = {}) ⇒ Object
178 179 180 181 182 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 178 def delete_river(type, ={}) params = {:index => "_river"} params[:type] = type unless type.nil? standard_request(:delete, params) end |
#flush(index_list, options = {}) ⇒ Object
150 151 152 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 150 def flush(index_list, ={}) standard_request(:post, {:index => index_list, :op => "_flush"}, , "") end |
#get_aliases(index, options = {}) ⇒ Object
126 127 128 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 126 def get_aliases(index, ={}) standard_request(:get, {:index => index, :op => "_aliases"}, ) end |
#get_river(type, options = {}) ⇒ Object
170 171 172 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 170 def get_river(type, ={}) standard_request(:get, {:index => "_river", :type => type, :op => "_meta"}) end |
#get_settings(index, options) ⇒ Object
146 147 148 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 146 def get_settings(index, ) standard_request(:get, {:index => index, :op => "_settings"}, ) end |
#index_mapping(index_list, options = {}) ⇒ Object
134 135 136 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 134 def index_mapping(index_list, ={}) standard_request(:get, {:index => index_list, :op => "_mapping"}) end |
#index_status(index_list, options = {}) ⇒ Object
110 111 112 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 110 def index_status(index_list, ={}) standard_request(:get, {:index => index_list, :op => "_status"}) end |
#optimize(index_list, options = {}) ⇒ Object
162 163 164 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 162 def optimize(index_list, ={}) standard_request(:post, {:index => index_list, :op => "_optimize"}, , {}) end |
#refresh(index_list, options = {}) ⇒ Object
154 155 156 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 154 def refresh(index_list, ={}) standard_request(:post, {:index => index_list, :op => "_refresh"}, {}, "") end |
#river_status(type, options = {}) ⇒ Object
174 175 176 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 174 def river_status(type, ={}) standard_request(:get, {:index => "_river", :type => type, :op => "_status"}) end |
#snapshot(index_list, options = {}) ⇒ Object
158 159 160 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 158 def snapshot(index_list, ={}) standard_request(:post, {:index => index_list, :type => "_gateway", :op => "snapshot"}, {}, "") end |
#update_mapping(index, type, mapping, options) ⇒ Object
130 131 132 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 130 def update_mapping(index, type, mapping, ) standard_request(:put, {:index => index, :type => type, :op => "_mapping"}, , encoder.encode(mapping)) end |
#update_settings(index, settings, options) ⇒ Object
142 143 144 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 142 def update_settings(index, settings, ) standard_request(:put, {:index => index, :op => "_settings"}, , encoder.encode(settings)) end |