1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[feature/sphinx-fulltext-search] include sample sphinx.conf in docs

PHPBB3-10946
This commit is contained in:
Dhruv Goel
2012-06-25 00:03:46 +05:30
committed by Dhruv
parent 8d76bc45ee
commit a3b2caf841

View File

@@ -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