-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3162 from 3scale/update-thinking-sphinx-configura…
…tion Update Thinking Sphinx configuration file: add batch_size
- Loading branch information
Showing
1 changed file
with
29 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,43 @@ | ||
common: &sphinx | ||
configuration_file: <%= ENV.fetch('THINKING_SPHINX_CONFIGURATION_FILE') { Rails.root.join("config/#{Rails.env}.sphinx.conf")} %> | ||
production: | ||
# ---------------------------------- | ||
# Thinking Sphinx configuration | ||
# see https://gist.github.com/pat/a7d73376dd657b4457092efc9e9c418a | ||
# ---------------------------------- | ||
mysql41: 9306 | ||
address: <%= ENV['THINKING_SPHINX_ADDRESS'] || '0.0.0.0' %> | ||
|
||
big_document_ids: true | ||
|
||
configuration_file: <%= ENV.fetch('THINKING_SPHINX_CONFIGURATION_FILE') { Rails.root.join("config/#{Rails.env}.sphinx.conf")} %> | ||
|
||
# Batch size for real-time index processing (via the `ts:index` and `ts:rebuild` tasks), the default is 1000 | ||
batch_size: <%= ENV.fetch('THINKING_SPHINX_BATCH_SIZE', 1000) %> | ||
|
||
# ---------------------------------- | ||
# Sphinx index configuration, see http://sphinxsearch.com/docs/current.html#confgroup-index | ||
# ---------------------------------- | ||
charset_table: 0..9, A..Z->a..z, a..z # strip _ from words | ||
|
||
html_strip: 1 | ||
html_remove_elements: "style, script" | ||
html_index_attrs: "img=alt,title; a=title" | ||
min_infix_len: 3 | ||
pid_file: <%= ENV.fetch('THINKING_SPHINX_PID_FILE') { Rails.root.join('log', "searchd.#{Rails.env}.pid") } %> | ||
|
||
# ---------------------------------- | ||
# Data source configuration, see http://sphinxsearch.com/docs/current.html#confgroup-source | ||
# ---------------------------------- | ||
|
||
# This is from TS FAQ - makes reindex MUCH faster. | ||
sql_range_step: 2000000000 | ||
|
||
charset_table: 0..9, A..Z->a..z, a..z # strip _ from words | ||
# ---------------------------------- | ||
# Sphinx daemon (searchd) configuration, see http://sphinxsearch.com/docs/current.html#confgroup-searchd | ||
# ---------------------------------- | ||
|
||
# Use standard output for logs in container environments | ||
query_log: /dev/stdout | ||
log: /dev/stdout | ||
|
||
development: | ||
<<: *sphinx | ||
|
||
test: &test | ||
<<: *sphinx | ||
<% case ENV['DATABASE_URL'].to_s | ||
when /^oracle/ %> | ||
sql_port: 1521 | ||
<% when /^postgresql/ %> | ||
sql_port: 5432 | ||
<% else %> | ||
mysql41: <%= 9313 + ENV['TEST_ENV_NUMBER'].to_i %> | ||
<% end %> | ||
configuration_file: <%= Rails.root.join('config', "test#{ENV['TEST_ENV_NUMBER']}.sphinx.conf") %> | ||
indices_location: <%= Rails.root.join("db/sphinx/test#{ENV['TEST_ENV_NUMBER']}") %> | ||
pid_file: <%= Rails.root.join("log/searchd.test#{ENV['TEST_ENV_NUMBER']}.pid") %> | ||
hard_retry_count: 5 | ||
binlog_path: '' | ||
|
||
preview: | ||
<<: *sphinx | ||
binlog_path: '' | ||
address: <%= ENV['THINKING_SPHINX_ADDRESS'] || '0.0.0.0' %> | ||
pid_file: <%= ENV.fetch('THINKING_SPHINX_PID_FILE') { Rails.root.join('log', "searchd.#{Rails.env}.pid") } %> | ||
|
||
production: | ||
<<: *sphinx | ||
binlog_path: '' | ||
address: <%= ENV['THINKING_SPHINX_ADDRESS'] || '0.0.0.0' %> |