mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:41:59 +01:00
87 lines
1.9 KiB
Plaintext
87 lines
1.9 KiB
Plaintext
|
#
|
||
|
# Minimal Sphinx configuration sample (clean, simple, functional)
|
||
|
#
|
||
|
|
||
|
source main
|
||
|
{
|
||
|
type = mysql
|
||
|
sql_host = localhost
|
||
|
sql_db = sphinx
|
||
|
sql_user = sphinx
|
||
|
sql_pass = sphinx
|
||
|
|
||
|
sql_query_pre = SET NAMES utf8
|
||
|
sql_query = SELECT id, `from`, `to`, `subject`, `date`, `body`, `piler_id`, `header_id`, `body_id`, `size` FROM sph_index \
|
||
|
WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
|
||
|
|
||
|
sql_attr_uint = size
|
||
|
sql_attr_uint = date
|
||
|
sql_attr_string = piler_id
|
||
|
sql_attr_string = header_id
|
||
|
sql_attr_string = body_id
|
||
|
}
|
||
|
|
||
|
source delta
|
||
|
{
|
||
|
type = mysql
|
||
|
sql_host = localhost
|
||
|
sql_db = sphinx
|
||
|
sql_user = sphinx
|
||
|
sql_pass = sphinx
|
||
|
|
||
|
sql_query_pre = SET NAMES utf8
|
||
|
sql_query_pre = REPLACE INTO sph_counter SELECT 1, MAX(id) FROM sph_index
|
||
|
sql_query_post_index = DELETE FROM sph_index WHERE id<=(SELECT max_doc_id FROM sph_counter WHERE counter_id=1)
|
||
|
sql_query = SELECT id, `from`, `to`, `subject`, `date`, `body`, `piler_id`, `header_id`, `body_id`, `size` FROM sph_index \
|
||
|
WHERE id <= (SELECT max_doc_id FROM sph_counter WHERE counter_id=1)
|
||
|
|
||
|
sql_attr_uint = size
|
||
|
sql_attr_uint = date
|
||
|
sql_attr_string = piler_id
|
||
|
sql_attr_string = header_id
|
||
|
sql_attr_string = body_id
|
||
|
}
|
||
|
|
||
|
|
||
|
index main1
|
||
|
{
|
||
|
source = main
|
||
|
path = /var/data/main1
|
||
|
docinfo = extern
|
||
|
charset_type = utf-8
|
||
|
}
|
||
|
|
||
|
|
||
|
index delta1
|
||
|
{
|
||
|
source = delta
|
||
|
path = /var/data/delta1
|
||
|
docinfo = extern
|
||
|
charset_type = utf-8
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
indexer
|
||
|
{
|
||
|
mem_limit = 32M
|
||
|
}
|
||
|
|
||
|
|
||
|
searchd
|
||
|
{
|
||
|
listen = 9312
|
||
|
listen = 9306:mysql41
|
||
|
log = /var/data/log/searchd.log
|
||
|
binlog_path =
|
||
|
query_log = /var/data/log/query.log
|
||
|
read_timeout = 5
|
||
|
max_children = 30
|
||
|
pid_file = /var/data/log/searchd.pid
|
||
|
max_matches = 1000
|
||
|
seamless_rotate = 1
|
||
|
preopen_indexes = 1
|
||
|
unlink_old = 1
|
||
|
workers = threads # for RT to work
|
||
|
}
|