diff --git a/etc/sphinx.conf b/etc/sphinx.conf index a5ceddf..d887fd8 100644 --- a/etc/sphinx.conf +++ b/etc/sphinx.conf @@ -2,14 +2,17 @@ # Minimal Sphinx configuration sample (clean, simple, functional) # -source main +source base { type = mysql sql_host = localhost sql_db = piler sql_user = piler sql_pass = piler +} +source main : base +{ sql_query_pre = SET NAMES utf8 sql_query = SELECT id, `from`, `to`, `fromdomain`, `todomain`, `subject`, `arrived`, `sent`, `body`, `size`, `direction`, `folder`, `attachments`, `attachment_types` FROM sph_index \ WHERE id<=( SELECT max_doc_id FROM sph_counter WHERE counter_id=1 ) @@ -24,14 +27,8 @@ } -source delta +source delta : base { - type = mysql - sql_host = localhost - sql_db = piler - sql_user = piler - sql_pass = piler - 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) @@ -50,14 +47,8 @@ } -source tag +source tag : base { - type = mysql - sql_host = localhost - sql_db = piler - sql_user = piler - sql_pass = piler - sql_query_pre = SET NAMES utf8 sql_query = SELECT `_id`, `id`, `uid`, `tag` FROM `tag` @@ -67,14 +58,8 @@ } -source note +source note : base { - type = mysql - sql_host = localhost - sql_db = piler - sql_user = piler - sql_pass = piler - sql_query_pre = SET NAMES utf8 sql_query = SELECT `_id`, `id`, `uid`, `note` FROM `note` @@ -155,5 +140,5 @@ preopen_indexes = 1 unlink_old = 1 workers = threads # for RT to work - compat_sphinxql_magics = 0 + compat_sphinxql_magics = 0 }