Commit caa681058da060fdcac326e3d9ea2198a73fb77d

Authored by Andrew Kane
1 parent b0153204

Removed prefix [skip ci]

Showing 1 changed file with 8 additions and 8 deletions   Show diff stats
lib/searchkick/index.rb
... ... @@ -71,12 +71,12 @@ module Searchkick
71 71 }
72 72 )
73 73  
74   - Searchkick::Results.new(nil, response).total_count
  74 + Results.new(nil, response).total_count
75 75 end
76 76  
77 77 def promote(new_name, update_refresh_interval: false)
78 78 if update_refresh_interval
79   - new_index = Searchkick::Index.new(new_name, @options)
  79 + new_index = Index.new(new_name, @options)
80 80 settings = options[:settings] || {}
81 81 refresh_interval = (settings[:index] && settings[:index][:refresh_interval]) || "1s"
82 82 new_index.update_settings(index: {refresh_interval: refresh_interval})
... ... @@ -123,7 +123,7 @@ module Searchkick
123 123 def clean_indices
124 124 indices = all_indices(unaliased: true)
125 125 indices.each do |index|
126   - Searchkick::Index.new(index).delete
  126 + Index.new(index).delete
127 127 end
128 128 indices
129 129 end
... ... @@ -204,7 +204,7 @@ module Searchkick
204 204 # queue
205 205  
206 206 def reindex_queue
207   - Searchkick::ReindexQueue.new(name)
  207 + ReindexQueue.new(name)
208 208 end
209 209  
210 210 # reindex
... ... @@ -256,7 +256,7 @@ module Searchkick
256 256  
257 257 def create_index(index_options: nil)
258 258 index_options ||= self.index_options
259   - index = Searchkick::Index.new("#{name}_#{Time.now.strftime('%Y%m%d%H%M%S%L')}", @options)
  259 + index = Index.new("#{name}_#{Time.now.strftime('%Y%m%d%H%M%S%L')}", @options)
260 260 index.create(index_options)
261 261 index
262 262 end
... ... @@ -354,8 +354,8 @@ module Searchkick
354 354  
355 355 if resume
356 356 index_name = all_indices.sort.last
357   - raise Searchkick::Error, "No index to resume" unless index_name
358   - index = Searchkick::Index.new(index_name, @options)
  357 + raise Error, "No index to resume" unless index_name
  358 + index = Index.new(index_name, @options)
359 359 else
360 360 clean_indices unless retain
361 361  
... ... @@ -431,7 +431,7 @@ module Searchkick
431 431 # https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation
432 432 def check_uuid(old_uuid, new_uuid)
433 433 if old_uuid != new_uuid
434   - raise Searchkick::Error, "Safety check failed - only run one Model.reindex per model at a time"
  434 + raise Error, "Safety check failed - only run one Model.reindex per model at a time"
435 435 end
436 436 end
437 437  
... ...