Sha256: a6f3f254ed8ff235b43c2fbbf7e4fb7f4e76a192789a58ff9435624b5960afb7

Contents?: true

Size: 747 Bytes

Versions: 4

Compression:

Stored size: 747 Bytes

Contents

class SphinxController
  def initialize
    config.searchd.mysql41 = 9307
  end

  def setup
    FileUtils.mkdir_p config.indices_location
    config.render_to_file && index

    ThinkingSphinx::Configuration.reset
    ActiveSupport::Dependencies.clear

    config.index_paths.each do |path|
      Dir["#{path}/**/*.rb"].each { |file| $LOADED_FEATURES.delete file }
    end

    config.searchd.mysql41 = 9307
    config.settings['quiet_deltas']      = true
    config.settings['attribute_updates'] = true
  end

  def start
    config.controller.start
  end

  def stop
    config.controller.stop
  end

  def index(*indices)
    config.controller.index *indices
  end

  private

  def config
    ThinkingSphinx::Configuration.instance
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
ts-sidekiq-delta-0.3.0 spec/acceptance/support/sphinx_controller.rb
ts-sidekiq-delta-0.2.0 spec/acceptance/support/sphinx_controller.rb
ts-sidekiq-delta-0.1.0 spec/acceptance/support/sphinx_controller.rb
thinking-sphinx-3.0.0.pre spec/acceptance/support/sphinx_controller.rb