Module: Chewy::Index::Aliases::ClassMethods
- Defined in:
- lib/chewy/index/aliases.rb
Instance Method Summary collapse
Instance Method Details
#aliases ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/chewy/index/aliases.rb', line 13 def aliases empty_if_not_found do client.indices.get_alias(index: index_name, name: '*').values.flat_map do |aliases| aliases['aliases'].keys end end.compact.uniq end |
#indexes ⇒ Object
7 8 9 10 11 |
# File 'lib/chewy/index/aliases.rb', line 7 def indexes indexes = empty_if_not_found { client.indices.get(index: index_name).keys } indexes += empty_if_not_found { client.indices.get_alias(name: index_name).keys } indexes.compact.uniq end |