<% @path = "#{RUBBER_ROOT}/config/sphinx.yml" %> # Taken from: http://ts.freelancing-gods.com/rdoc/classes/ThinkingSphinx/Configuration.html # # Here are the default settings, relative to RUBBER_ROOT where relevant: # # config file:: config/#{environment}.sphinx.conf # searchd log file:: log/searchd.log # query log file:: log/searchd.query.log # pid file:: log/searchd.#{environment}.pid # searchd files:: db/sphinx/#{environment}/ # address:: 127.0.0.1 # port:: 3312 # allow star:: false # min prefix length:: 1 # min infix length:: 1 # mem limit:: 64M # max matches:: 1000 # morphology:: stem_en # charset type:: utf-8 # charset table:: nil # ignore chars:: nil # html strip:: false # html remove elements:: '' # # If you want to change these settings, create a YAML file at # config/sphinx.yml with settings for each environment, in a similar # fashion to database.yml - using the following keys: config_file, # searchd_log_file, query_log_file, pid_file, searchd_file_path, port, # allow_star, enable_star, min_prefix_len, min_infix_len, mem_limit, # max_matches, # morphology, charset_type, charset_table, ignore_chars, # html_strip, # html_remove_elements. I think you've got the idea. # # Each setting in the YAML file is optional - so only put in the ones you # want to change. <%= RUBBER_ENV %>: address: <%= rubber_instances.for_role('sphinx').first.full_name rescue 'localhost' %> mem_limit: <%= RUBBER_ENV == 'production' ? '1024M' : '64M' %> config_file: sphinx/config/<%= RUBBER_ENV %>.sphinx.conf searchd_file_path: sphinx/db/<%= RUBBER_ENV %>/ pid_file: <%= RUBBER_ROOT %>/log/searchd.<%= RUBBER_ENV %>.pid searchd_log_file: <%= RUBBER_ROOT %>/log/searchd.log query_log_file: <%= RUBBER_ROOT %>/log/searchd.query.log