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
- #delete_index(index, options = {}) ⇒ Object
- #flush(index_list, options = {}) ⇒ Object
- #index_status(index_list, options = {}) ⇒ Object
- #optimize(index_list, options = {}) ⇒ Object
- #refresh(index_list, options = {}) ⇒ Object
- #snapshot(index_list, options = {}) ⇒ Object
- #update_mapping(index, type, mapping, options) ⇒ Object
Instance Method Details
#alias_index(operations, options = {}) ⇒ Object
86 87 88 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 86 def alias_index(operations, ={}) standard_request(:post, {:op => "_aliases"}, {}, encoder.encode(operations)) end |
#create_index(index, create_options = {}, options = {}) ⇒ Object
78 79 80 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 78 def create_index(index, ={}, ={}) standard_request(:put, {:index => index}, {}, encoder.encode()) end |
#delete_index(index, options = {}) ⇒ Object
82 83 84 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 82 def delete_index(index, ={}) standard_request(:delete, {:index => index}) end |
#flush(index_list, options = {}) ⇒ Object
94 95 96 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 94 def flush(index_list, ={}) standard_request(:post, {:index => index_list, :op => "_flush"}, , "") end |
#index_status(index_list, options = {}) ⇒ Object
74 75 76 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 74 def index_status(index_list, ={}) standard_request(:get, {:index => index_list, :op => "_status"}) end |
#optimize(index_list, options = {}) ⇒ Object
106 107 108 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 106 def optimize(index_list, ={}) standard_request(:post, {:index => index_list, :op => "_optimize"}, , {}, "") end |
#refresh(index_list, options = {}) ⇒ Object
98 99 100 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 98 def refresh(index_list, ={}) standard_request(:post, {:index => index_list, :op => "_refresh"}, {}, "") end |
#snapshot(index_list, options = {}) ⇒ Object
102 103 104 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 102 def snapshot(index_list, ={}) standard_request(:post, {:index => index_list, :type => "_gateway", :op => "snapshot"}, {}, "") end |
#update_mapping(index, type, mapping, options) ⇒ Object
90 91 92 |
# File 'lib/elasticsearch/transport/base_protocol.rb', line 90 def update_mapping(index, type, mapping, ) standard_request(:put, {:index => index, :type => type, :op => "_mapping"}, , encoder.encode(mapping)) end |