Module: Eson::Shared::Aliases
- Extended by:
- API
- Defined in:
- lib/eson/shared/indices/aliases.rb
Overview
Requests using this API have the following properties:
The request supports the following parameters: actions The request declares the following parameters as source parameters: actions
Instance Method Summary collapse
- #actions ⇒ Object private
-
#add(index, aka, options = {}) ⇒ Object
Adds an alias to the alias request.
-
#parameters ⇒ Array<String>
The request supports the following parameters: actions.
-
#remove(index, aka) ⇒ Object
Removes an alias.
-
#source_param ⇒ Array<String>
The request declares the following parameters as source parameters: actions.
Methods included from API
multi_index, multi_types, no_indices
Methods included from Chainable
Instance Method Details
#actions ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 |
# File 'lib/eson/shared/indices/aliases.rb', line 47 def actions @actions ||= [] end |
#add(index, aka, options = {}) ⇒ Object
Adds an alias to the alias request. The aliased index and the alias are given directly, while further options can be provided in the options hash.
33 34 35 |
# File 'lib/eson/shared/indices/aliases.rb', line 33 def add(index, aka, = {}) actions << {:add => { :index => index, :alias => aka}.merge!()} end |
#parameters ⇒ Array<String>
The request supports the following parameters: actions
15 |
# File 'lib/eson/shared/indices/aliases.rb', line 15 parameters :actions |
#remove(index, aka) ⇒ Object
Removes an alias. To remove and alias, both the original index and the alias have to be given.
42 43 44 |
# File 'lib/eson/shared/indices/aliases.rb', line 42 def remove(index, aka) actions << {:remove => { :index => index, :alias => aka}} end |
#source_param ⇒ Array<String>
The request declares the following parameters as source parameters: actions
17 |
# File 'lib/eson/shared/indices/aliases.rb', line 17 source_param [:actions] |