Class: ThinkingSphinx::Commands::IndexSQL

Inherits:
Base
  • Object
show all
Defined in:
lib/thinking_sphinx/commands/index_sql.rb

Instance Method Summary collapse

Methods inherited from Base

call, #call_with_handling

Methods included from WithOutput

#initialize

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/thinking_sphinx/commands/index_sql.rb', line 4

def call
  if indices.empty?
    ThinkingSphinx.before_index_hooks.each { |hook| hook.call }
  end

  configuration.indexing_strategy.call(indices) do |index_names|
    configuration.guarding_strategy.call(index_names) do |names|
      controller.index *names, :verbose => options[:verbose]
    end
  end
end