Sha256: 196cac4abbd91ac14b5a7cdb13b8e44a6f9167a12109df2f9a149c008faea1b8

Contents?: true

Size: 531 Bytes

Versions: 17

Compression:

Stored size: 531 Bytes

Contents

# frozen_string_literal: true

class ThinkingSphinx::Commands::IndexSQL < ThinkingSphinx::Commands::Base
  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

  private

  def indices
    options[:indices] || []
  end

  def type
    'indexing'
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thinking-sphinx-5.6.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.5.1 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.5.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.4.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.3.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.2.1 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.2.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.1.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-5.0.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.4.1 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.4.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.3.2 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.3.1 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.3.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.2.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.1.0 lib/thinking_sphinx/commands/index_sql.rb
thinking-sphinx-4.0.0 lib/thinking_sphinx/commands/index_sql.rb