piler/etc/sphinx.conf.in

201 lines
5.4 KiB
Plaintext
Raw Normal View History

2011-11-14 15:57:52 +01:00
#
2013-08-18 13:59:55 +02:00
# minimal sphinx configuration suited to piler
2011-11-14 15:57:52 +01:00
#
2013-03-17 14:24:42 +01:00
source base
2011-11-14 15:57:52 +01:00
{
type = mysql
sql_host = MYSQL_HOSTNAME
sql_db = MYSQL_DATABASE
sql_user = MYSQL_USERNAME
sql_pass = MYSQL_PASSWORD
2011-11-14 15:57:52 +01:00
sql_attr_uint = size
2011-11-28 14:21:14 +01:00
sql_attr_uint = sent
sql_attr_uint = attachments
2011-11-14 15:57:52 +01:00
}
2013-03-17 14:24:42 +01:00
source delta : base
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)
2012-01-07 00:00:36 +01:00
sql_query_killlist = SELECT `id` FROM `metadata` WHERE `deleted`=1
2013-03-31 15:50:39 +02:00
}
2011-11-28 14:21:14 +01:00
2013-03-31 15:50:39 +02:00
source main1 : base
{
sql_query_pre = SET NAMES utf8
2013-09-20 20:18:04 +02:00
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index WHERE id=-1
2011-11-14 15:57:52 +01:00
}
2013-03-31 15:50:39 +02:00
source main2 : base
{
sql_query_pre = SET NAMES utf8
2013-09-20 20:18:04 +02:00
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index WHERE id=-1
2013-03-31 15:50:39 +02:00
}
source main3 : base
{
sql_query_pre = SET NAMES utf8
2013-09-20 20:18:04 +02:00
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index WHERE id=-1
2013-03-31 15:50:39 +02:00
}
source main4 : base
{
sql_query_pre = SET NAMES utf8
2013-09-20 20:18:04 +02:00
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index WHERE id=-1
2013-03-31 15:50:39 +02:00
}
2012-01-07 00:00:36 +01:00
2013-07-08 11:31:17 +02:00
source dailydelta : base
{
sql_query_pre = SET NAMES utf8
2013-09-20 20:18:04 +02:00
sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index WHERE id=-1
2013-07-08 11:31:17 +02:00
}
2013-03-17 14:24:42 +01:00
source tag : base
2011-12-05 17:18:03 +01:00
{
sql_query_pre = SET NAMES utf8
2014-09-22 11:13:55 +02:00
sql_query = SELECT `_id`, `id` AS iid, `uid`, `tag` FROM `tag`
2012-09-02 23:18:04 +02:00
2014-09-22 11:13:55 +02:00
sql_attr_uint = iid
2012-09-02 23:18:04 +02:00
sql_attr_uint = uid
}
2013-03-17 14:24:42 +01:00
source note : base
2012-09-02 23:18:04 +02:00
{
sql_query_pre = SET NAMES utf8
2014-09-22 11:13:55 +02:00
sql_query = SELECT `_id`, `id` AS iid, `uid`, `note` FROM `note`
2014-09-22 11:13:55 +02:00
sql_attr_uint = iid
sql_attr_uint = uid
2011-12-05 17:18:03 +01:00
}
2011-11-14 15:57:52 +01:00
index main1
{
2013-03-31 15:50:39 +02:00
source = main1
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/main1
2011-11-14 15:57:52 +01:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2011-11-14 15:57:52 +01:00
}
2013-03-31 15:50:39 +02:00
index main2
{
source = main2
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/main2
2013-03-31 15:50:39 +02:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
2013-03-31 15:50:39 +02:00
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2013-03-31 15:50:39 +02:00
}
index main3
{
source = main3
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/main3
2013-03-31 15:50:39 +02:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
2013-03-31 15:50:39 +02:00
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2013-03-31 15:50:39 +02:00
}
index main4
{
source = main4
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/main4
2013-03-31 15:50:39 +02:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
2013-03-31 15:50:39 +02:00
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2013-03-31 15:50:39 +02:00
}
2011-11-14 15:57:52 +01:00
2013-07-08 11:31:17 +02:00
index dailydelta1
{
source = dailydelta
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/dailydelta1
2013-07-08 11:31:17 +02:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
2013-07-08 11:31:17 +02:00
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2013-07-08 11:31:17 +02:00
}
2011-11-14 15:57:52 +01:00
index delta1
{
source = delta
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/delta1
2011-11-14 15:57:52 +01:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2011-11-14 15:57:52 +01:00
}
2011-12-05 17:18:03 +01:00
index tag1
{
source = tag
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/tag1
2011-12-05 17:18:03 +01:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
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
2015-01-09 10:49:52 +01:00
path = LOCALSTATEDIR/piler/sphinx/note1
2012-09-02 23:18:04 +02:00
docinfo = extern
2014-09-22 13:01:01 +02:00
dict = keywords
2012-09-02 23:18:04 +02:00
min_prefix_len = 6
min_word_len = 1
2014-09-05 14:02:55 +02:00
#ngram_len = 1
#ngram_chars = U+3000..U+2FA1F
2012-09-02 23:18:04 +02:00
}
2011-11-14 15:57:52 +01:00
indexer
{
2014-01-01 20:56:56 +01:00
mem_limit = 256M
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
pid_file = /var/run/piler/searchd.pid
2011-11-14 15:57:52 +01:00
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads # for RT to work
}