mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-29 21:10:31 +02:00
Merge PR #865 branch 'dhruvgoel92/feature/sphinx-fulltext-search' into develop
* dhruvgoel92/feature/sphinx-fulltext-search: (57 commits) [feature/sphinx-fulltext-search] add sphinx to Authors file [feature/sphinx-fulltext-search] add sphinxapi.php file [feature/sphinx-fulltext-search] fix auth bug [feature/sphinx-fulltext-search] remove unused property [feature/sphinx-fulltext-search] use 9312 as default port [feature/sphinx-fulltext-search] fix language of host config [feature/sphinx-fulltext-search] fix sphinx for arbitary host [feature/sphinx-fulltext-search] coding changes acc to phbb conventions [feature/sphinx-fulltext-search] fixing comments [feature/sphinx-fulltext-search] add trailing slash in language [feature/sphinx-fulltext-search] improve port option [feature/sphinx-fulltext-search] remove stopwords and config path [feature/sphinx-fulltext-search] makes sql host configurable [feature/sphinx-fulltext-search] use readonly instead of disabled [feature/sphinx-fulltext-search] fix language keys' typo [feature/sphinx-fulltext-search] remove note from db_tools [feature/sphinx-fulltext-search] add support for postgres [feature/sphinx-fulltext-search] add pgsql functionality [feature/sphinx-fulltext-search] use Update in sphinx query [feature/sphinx-fulltext-search] use CASE instead of IF ...
This commit is contained in:
@@ -75,6 +75,7 @@ Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
|
||||
Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
|
||||
Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
|
||||
jQuery (c) 2011, John Resig. http://jquery.com/
|
||||
Sphinx Technologies Inc (c) 2001-2012 Andrew Aksyonoff, http://sphinxsearch.com/
|
||||
|
||||
PHP License, version 3.0:
|
||||
Pear (c) 2001-2004 PHP Group, http://pear.php.net
|
||||
|
96
phpBB/docs/sphinx.sample.conf
Normal file
96
phpBB/docs/sphinx.sample.conf
Normal file
@@ -0,0 +1,96 @@
|
||||
source source_phpbb_{SPHINX_ID}_main
|
||||
{
|
||||
type = mysql #mysql or pgsql
|
||||
sql_host = localhost #SQL server host sphinx connects to
|
||||
sql_user = username
|
||||
sql_pass = password
|
||||
sql_db = db_name
|
||||
sql_port = 3306 #optional, default is 3306 for mysql and 5432 for pgsql
|
||||
sql_query_pre = SET NAMES 'utf8'
|
||||
sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = MAX(post_id) WHERE counter_id = 1
|
||||
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,
|
||||
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END 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 = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
|
||||
sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id
|
||||
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_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main
|
||||
{
|
||||
sql_query_range =
|
||||
sql_range_step =
|
||||
sql_query = SELECT
|
||||
\
|
||||
p.post_id AS id,
|
||||
\
|
||||
p.forum_id,
|
||||
\
|
||||
p.topic_id,
|
||||
\
|
||||
p.poster_id,
|
||||
\
|
||||
CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END 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_{SPHINX_ID}_main
|
||||
{
|
||||
path = {DATA_PATH}/index_phpbb_{SPHINX_ID}_main
|
||||
source = source_phpbb_{SPHINX_ID}_main
|
Reference in New Issue
Block a user