mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[feature/sphinx-fulltext-search] improve port option
Use listen instead of deprecated port value in sphinx config file. sqlhost uses default $dbhost. PHPBB3-10946
This commit is contained in:
parent
e40758db84
commit
39bac86f7d
3 changed files with 6 additions and 8 deletions
|
@ -5,7 +5,7 @@ source source_phpbb_{SPHINX_ID}_main
|
|||
sql_user = username
|
||||
sql_pass = password
|
||||
sql_db = db_name
|
||||
sql_port = 3306 #optional, default is 3306
|
||||
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
|
||||
|
@ -85,8 +85,7 @@ indexer
|
|||
searchd
|
||||
{
|
||||
compat_sphinxql_magics = 0
|
||||
listen = 127.0.0.1
|
||||
port = 3312
|
||||
listen = localhost:9312
|
||||
log = {DATA_PATH}/log/searchd.log
|
||||
query_log = {DATA_PATH}/log/sphinx-query.log
|
||||
read_timeout = 5
|
||||
|
|
|
@ -166,7 +166,7 @@ class phpbb_search_fulltext_sphinx
|
|||
array('sql_user', $dbuser),
|
||||
array('sql_pass', $dbpasswd),
|
||||
array('sql_db', $dbname),
|
||||
array('sql_port', $this->config['fulltext_sphinx_port']),
|
||||
array('sql_port', $dbport),
|
||||
array('sql_query_pre', 'SET NAMES \'utf8\''),
|
||||
array('sql_query_pre', 'UPDATE ' . SPHINX_TABLE . ' SET max_doc_id = (SELECT MAX(post_id) FROM ' . POSTS_TABLE . ') WHERE counter_id = 1'),
|
||||
array('sql_query_range', 'SELECT MIN(post_id), MAX(post_id) FROM ' . POSTS_TABLE . ''),
|
||||
|
@ -241,8 +241,7 @@ class phpbb_search_fulltext_sphinx
|
|||
),
|
||||
'searchd' => array(
|
||||
array('compat_sphinxql_magics' , '0'),
|
||||
array('listen' , '127.0.0.1'),
|
||||
array('port', ($this->config['fulltext_sphinx_port']) ? $this->config['fulltext_sphinx_port'] : '3312'),
|
||||
array('listen' , 'localhost' . ':' . ($this->config['fulltext_sphinx_port'] ? $this->config['fulltext_sphinx_port'] : '3312')),
|
||||
array('log', $this->config['fulltext_sphinx_data_path'] . 'log/searchd.log'),
|
||||
array('query_log', $this->config['fulltext_sphinx_data_path'] . 'log/sphinx-query.log'),
|
||||
array('read_timeout', '5'),
|
||||
|
@ -759,7 +758,7 @@ class phpbb_search_fulltext_sphinx
|
|||
$config_vars = array(
|
||||
'fulltext_sphinx_data_path' => 'string',
|
||||
'fulltext_sphinx_host' => 'string',
|
||||
'fulltext_sphinx_port' => 'int',
|
||||
'fulltext_sphinx_port' => 'string',
|
||||
'fulltext_sphinx_indexer_mem_limit' => 'int',
|
||||
);
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ $lang = array_merge($lang, array(
|
|||
'FULLTEXT_SPHINX_INDEXER_MEM_LIMIT_EXPLAIN' => 'This number should at all times be lower than the RAM available on your machine. If you experience periodic performance problems this might be due to the indexer consuming too many resources. It might help to lower the amount of memory available to the indexer.',
|
||||
'FULLTEXT_SPHINX_MAIN_POSTS' => 'Number of posts in main index',
|
||||
'FULLTEXT_SPHINX_PORT' => 'Sphinx search daemon port',
|
||||
'FULLTEXT_SPHINX_PORT_EXPLAIN' => 'Port on which the sphinx search daemon (searchd) listens. Leave empty to use the default 3312',
|
||||
'FULLTEXT_SPHINX_PORT_EXPLAIN' => 'Port on which the sphinx search daemon (searchd) listens. Leave empty to use the default Sphinx API port 3312 ',
|
||||
'FULLTEXT_SPHINX_WRONG_DATABASE' => 'The sphinx search for phpBB supports MySQL and PostgreSQL only.',
|
||||
'FULLTEXT_SPHINX_CONFIG_FILE' => 'Sphinx config file',
|
||||
'FULLTEXT_SPHINX_CONFIG_FILE_EXPLAIN' => 'The generated content of the sphinx config file. This data needs to be pasted into the sphinx.conf which is used by sphinx search daemon.',
|
||||
|
|
Loading…
Add table
Reference in a new issue