2011-11-14 15:57:52 +01:00
|
|
|
#
|
|
|
|
# Minimal Sphinx configuration sample (clean, simple, functional)
|
|
|
|
#
|
|
|
|
|
|
|
|
source main
|
|
|
|
{
|
|
|
|
type = mysql
|
|
|
|
sql_host = localhost
|
2012-02-11 23:12:30 +01:00
|
|
|
sql_db = piler
|
|
|
|
sql_user = piler
|
|
|
|
sql_pass = piler
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
sql_query_pre = SET NAMES utf8
|
2012-09-07 15:09:45 +02:00
|
|
|
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index \
|
2011-11-14 15:57:52 +01:00
|
|
|
WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 )
|
|
|
|
|
|
|
|
sql_attr_uint = size
|
2011-11-28 14:21:14 +01:00
|
|
|
sql_attr_uint = arrived
|
|
|
|
sql_attr_uint = sent
|
2012-01-03 00:19:43 +01:00
|
|
|
sql_attr_uint = direction
|
2012-09-07 15:09:45 +02:00
|
|
|
sql_attr_uint = folder
|
2011-11-28 14:21:14 +01:00
|
|
|
sql_attr_uint = attachments
|
2011-12-13 17:05:22 +01:00
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
}
|
|
|
|
|
2012-09-02 23:18:04 +02:00
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
source delta
|
|
|
|
{
|
|
|
|
type = mysql
|
|
|
|
sql_host = localhost
|
2012-02-11 23:12:30 +01:00
|
|
|
sql_db = piler
|
|
|
|
sql_user = piler
|
|
|
|
sql_pass = piler
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
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)
|
2012-09-07 15:09:45 +02:00
|
|
|
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index \
|
2011-11-14 15:57:52 +01:00
|
|
|
WHERE id <= (SELECT max_doc_id FROM sph_counter WHERE counter_id=1)
|
|
|
|
|
|
|
|
sql_attr_uint = size
|
2011-11-28 14:21:14 +01:00
|
|
|
sql_attr_uint = arrived
|
|
|
|
sql_attr_uint = sent
|
2012-01-03 00:19:43 +01:00
|
|
|
sql_attr_uint = direction
|
2012-09-07 15:09:45 +02:00
|
|
|
sql_attr_uint = folder
|
2011-11-28 14:21:14 +01:00
|
|
|
sql_attr_uint = attachments
|
2012-01-07 00:00:36 +01:00
|
|
|
|
|
|
|
sql_query_killlist = SELECT `id` FROM `metadata` WHERE `deleted`=1
|
2011-11-28 14:21:14 +01:00
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
}
|
|
|
|
|
2012-01-07 00:00:36 +01:00
|
|
|
|
2011-12-05 17:18:03 +01:00
|
|
|
source tag
|
|
|
|
{
|
|
|
|
type = mysql
|
|
|
|
sql_host = localhost
|
2012-02-11 23:12:30 +01:00
|
|
|
sql_db = piler
|
|
|
|
sql_user = piler
|
|
|
|
sql_pass = piler
|
2011-12-05 17:18:03 +01:00
|
|
|
|
|
|
|
sql_query_pre = SET NAMES utf8
|
2012-09-06 15:27:20 +02:00
|
|
|
sql_query = SELECT `_id`, `id`, `uid`, `tag` FROM `tag`
|
2012-09-02 23:18:04 +02:00
|
|
|
|
2012-09-06 15:27:20 +02:00
|
|
|
sql_attr_uint = id
|
2012-09-02 23:18:04 +02:00
|
|
|
sql_attr_uint = uid
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
source note
|
|
|
|
{
|
|
|
|
type = mysql
|
|
|
|
sql_host = localhost
|
|
|
|
sql_db = piler
|
|
|
|
sql_user = piler
|
|
|
|
sql_pass = piler
|
|
|
|
|
|
|
|
sql_query_pre = SET NAMES utf8
|
2012-09-06 15:27:20 +02:00
|
|
|
sql_query = SELECT `_id`, `id`, `uid`, `note` FROM `note`
|
2011-12-06 11:29:36 +01:00
|
|
|
|
2012-09-06 15:27:20 +02:00
|
|
|
sql_attr_uint = id
|
2011-12-06 11:29:36 +01:00
|
|
|
sql_attr_uint = uid
|
2011-12-05 17:18:03 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
|
|
|
|
index main1
|
|
|
|
{
|
|
|
|
source = main
|
2012-02-11 23:12:30 +01:00
|
|
|
path = /var/piler/sphinx/main1
|
2011-11-14 15:57:52 +01:00
|
|
|
docinfo = extern
|
|
|
|
charset_type = utf-8
|
2012-08-23 15:06:00 +02:00
|
|
|
enable_star = 1
|
|
|
|
min_prefix_len = 6
|
|
|
|
min_word_len = 1
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
index delta1
|
|
|
|
{
|
|
|
|
source = delta
|
2012-02-11 23:12:30 +01:00
|
|
|
path = /var/piler/sphinx/delta1
|
2011-11-14 15:57:52 +01:00
|
|
|
docinfo = extern
|
|
|
|
charset_type = utf-8
|
2012-08-23 15:06:00 +02:00
|
|
|
enable_star = 1
|
|
|
|
min_prefix_len = 6
|
|
|
|
min_word_len = 1
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-12-05 17:18:03 +01:00
|
|
|
index tag1
|
|
|
|
{
|
|
|
|
source = tag
|
2012-02-11 23:12:30 +01:00
|
|
|
path = /var/piler/sphinx/tag1
|
2011-12-05 17:18:03 +01:00
|
|
|
docinfo = extern
|
|
|
|
charset_type = utf-8
|
2012-08-23 15:06:00 +02:00
|
|
|
enable_star = 1
|
|
|
|
min_prefix_len = 6
|
|
|
|
min_word_len = 1
|
2011-12-05 17:18:03 +01:00
|
|
|
}
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
|
2012-09-02 23:18:04 +02:00
|
|
|
index note1
|
|
|
|
{
|
|
|
|
source = note
|
|
|
|
path = /var/piler/sphinx/note1
|
|
|
|
docinfo = extern
|
|
|
|
charset_type = utf-8
|
|
|
|
enable_star = 1
|
|
|
|
min_prefix_len = 6
|
|
|
|
min_word_len = 1
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-11-14 15:57:52 +01:00
|
|
|
indexer
|
|
|
|
{
|
2011-11-28 14:21:14 +01:00
|
|
|
mem_limit = 64M
|
2011-11-14 15:57:52 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
searchd
|
|
|
|
{
|
2012-02-11 23:12:30 +01:00
|
|
|
listen = 127.0.0.1:9312
|
|
|
|
listen = 127.0.0.1:9306:mysql41
|
|
|
|
log = /dev/null
|
2011-11-14 15:57:52 +01:00
|
|
|
binlog_path =
|
2012-02-11 23:12:30 +01:00
|
|
|
##query_log =
|
2011-11-14 15:57:52 +01:00
|
|
|
read_timeout = 5
|
|
|
|
max_children = 30
|
2012-02-11 23:12:30 +01:00
|
|
|
pid_file = /var/piler/sphinx/searchd.pid
|
2011-11-14 15:57:52 +01:00
|
|
|
max_matches = 1000
|
|
|
|
seamless_rotate = 1
|
|
|
|
preopen_indexes = 1
|
|
|
|
unlink_old = 1
|
|
|
|
workers = threads # for RT to work
|
2012-12-02 17:14:31 +01:00
|
|
|
compat_sphinxql_magics = 0
|
2011-11-14 15:57:52 +01:00
|
|
|
}
|