docker_resources/sphinx.conf
#
# Minimal Sphinx configuration sample (clean, simple, functional)
#
source kms_db
{
type = mysql
sql_host = localhost
sql_user = sphinx_u
sql_pass = search_perfect
sql_db = knowledge
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT ID, TopicID , IsTopic , IF(IsTopic, Subject, '') as Subject, Content, PostTime \
FROM carbon_posts \
WHERE IsDel=0
sql_attr_uint = TopicID
sql_attr_bool = IsTopic
sql_attr_timestamp = PostTime
sql_ranged_throttle = 500
sql_query_info = SELECT * FROM carbon_posts WHERE ID=$id
}
index PostsIndexes
{
source = kms_db
path = /var/lib/sphinxsearch/data/PostsIndexes
docinfo = extern
charset_type = utf-8
min_word_len = 1
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
ngram_len = 1
ngram_chars = U+3000..U+2FA1F
html_strip = 1
}
#
#
#index testrt
#{
# type = rt
# rt_mem_limit = 32M
#
# path = /var/lib/sphinxsearch/data/testrt
# charset_type = utf-8
#
# rt_field = title
# rt_field = content
# rt_attr_uint = gid
#}
indexer
{
mem_limit = 32M
}
searchd
{
listen = 9312
log = /var/log/sphinxsearch/searchd.log
query_log = /var/log/sphinxsearch/query.log
read_timeout = 5
max_children = 30
pid_file = /var/run/sphinxsearch/searchd.pid
max_matches = 10000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
binlog_path = /var/lib/sphinxsearch/data
}