diff options
author | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-06-25 00:03:46 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2012-07-12 17:27:26 +0530 |
commit | a3b2caf8416c687306b3c2e83b2fdc6e8708cce0 (patch) | |
tree | 33ec2bfed2f59e389fe0da96ea4f82f15bac63ae /phpBB/docs | |
parent | 8d76bc45ee19186f40dd3b459a9bd33e5e4c23d9 (diff) | |
download | forums-a3b2caf8416c687306b3c2e83b2fdc6e8708cce0.tar forums-a3b2caf8416c687306b3c2e83b2fdc6e8708cce0.tar.gz forums-a3b2caf8416c687306b3c2e83b2fdc6e8708cce0.tar.bz2 forums-a3b2caf8416c687306b3c2e83b2fdc6e8708cce0.tar.xz forums-a3b2caf8416c687306b3c2e83b2fdc6e8708cce0.zip |
[feature/sphinx-fulltext-search] include sample sphinx.conf in docs
PHPBB3-10946
Diffstat (limited to 'phpBB/docs')
-rw-r--r-- | phpBB/docs/sphinx.sample.conf | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf new file mode 100644 index 0000000000..d7e59a11fc --- /dev/null +++ b/phpBB/docs/sphinx.sample.conf @@ -0,0 +1,96 @@ +source source_phpbb_{AVATAR_SALT}_main +{ + type = mysql + sql_host = localhost + sql_user = username + sql_pass = password + sql_db = db_name + sql_port = 3306 #optional, default is 3306 + sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts + sql_range_step = 5000 + sql_query = SELECT
\ + p.post_id AS id,
\ + p.forum_id,
\ + p.topic_id,
\ + p.poster_id,
\ + IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post,
\ + p.post_time,
\ + p.post_subject,
\ + p.post_subject as title,
\ + p.post_text as data,
\ + t.topic_last_post_time,
\ + 0 as deleted
\ + FROM phpbb_posts p, phpbb_topics t
\ + WHERE
\ + p.topic_id = t.topic_id
\ + AND p.post_id >= $start AND p.post_id <= $end + sql_query_post = + sql_query_post_index = REPLACE INTO phpbb_sphinx ( counter_id, max_doc_id ) VALUES ( 1, $maxid ) + sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id + sql_query_pre = SET NAMES utf8 + sql_query_pre = REPLACE INTO phpbb_sphinx SELECT 1, MAX(post_id) FROM phpbb_posts + sql_attr_uint = forum_id + sql_attr_uint = topic_id + sql_attr_uint = poster_id + sql_attr_bool = topic_first_post + sql_attr_bool = deleted + sql_attr_timestamp = post_time + sql_attr_timestamp = topic_last_post_time + sql_attr_str2ordinal = post_subject +} +source source_phpbb_{AVATAR_SALT}_delta : source_phpbb_{AVATAR_SALT}_main +{ + sql_query_range = + sql_range_step = + sql_query = SELECT
\ + p.post_id AS id,
\ + p.forum_id,
\ + p.topic_id,
\ + p.poster_id,
\ + IF(p.post_id = t.topic_first_post_id, 1, 0) as topic_first_post,
\ + p.post_time,
\ + p.post_subject,
\ + p.post_subject as title,
\ + p.post_text as data,
\ + t.topic_last_post_time,
\ + 0 as deleted
\ + FROM phpbb_posts p, phpbb_topics t
\ + WHERE
\ + p.topic_id = t.topic_id
\ + AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 ) + sql_query_pre = +} +index index_phpbb_{AVATAR_SALT}_main +{ + path = {DATA_PATH}/index_phpbb_{AVATAR_SALT}_main + source = source_phpbb_{AVATAR_SALT}_main + docinfo = extern + morphology = none + stopwords = + min_word_len = 2 + charset_type = utf-8 + charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF + min_prefix_len = 0 + min_infix_len = 0 +} +index index_phpbb_{AVATAR_SALT}_delta : index_phpbb_{AVATAR_SALT}_main +{ + path = {DATA_PATH}/index_phpbb_{AVATAR_SALT}_delta + source = source_phpbb_{AVATAR_SALT}_delta +} +indexer +{ + mem_limit = 512M +} +searchd +{ + compat_sphinxql_magics = 0 + listen = 127.0.0.1 + port = 3312 + log = {DATA_PATH}/log/searchd.log + query_log = {DATA_PATH}/log/sphinx-query.log + read_timeout = 5 + max_children = 30 + pid_file = {DATA_PATH}/searchd.pid + max_matches = 20000 +} |