Commit d27f56b8c25f73494ac3209fdc84340870d2d9e1

Authored by Andrew Kane
1 parent 27b7ec65

Refactored index

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/index.rb
... ... @@ -135,7 +135,7 @@ module Searchkick
135 135  
136 136 # remove old indices that start w/ index_name
137 137 def clean_indices
138   - all_indices = Searchkick.client.indices.get_aliases
  138 + all_indices = client.indices.get_aliases
139 139 indices = all_indices.select{|k, v| (v.empty? || v["aliases"].empty?) && k =~ /\A#{Regexp.escape(name)}_\d{14,17}\z/ }.keys
140 140 indices.each do |index|
141 141 Searchkick::Index.new(index).delete
... ...