1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 07:07:51 +02:00

[feature/postgresql-fulltext-search] minor changes

Some changes in code to get it work against current develop.
PosgreSQL Fulltext search works for new install now.

PHPBB3-9730
This commit is contained in:
Dhruv Goel 2012-05-01 16:09:08 +05:30
parent 98bc7fa6ce
commit 9f4219b1c7
3 changed files with 15 additions and 9 deletions

View File

@ -9,23 +9,19 @@
*/ */
/** /**
* @ignore
*/ */
if (!defined('IN_PHPBB')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
/**
* @ignore
*/
include_once($phpbb_root_path . 'includes/search/search.' . $phpEx);
/** /**
* fulltext_postgres * fulltext_postgres
* Fulltext search for PostgreSQL * Fulltext search for PostgreSQL
* @package search * @package search
*/ */
class fulltext_postgres extends search_backend class phpbb_search_fulltext_postgres extends phpbb_search_base
{ {
var $stats = array(); var $stats = array();
var $word_length = array(); var $word_length = array();
@ -75,6 +71,16 @@ class fulltext_postgres extends search_backend
$error = false; $error = false;
} }
/**
* Returns the name of this search backend to be displayed to administrators
*
* @return string Name
*/
function get_name()
{
return 'PostgreSQL Fulltext';
}
/** /**
* Checks for correct PostgreSQL version and stores min/max word length in the config * Checks for correct PostgreSQL version and stores min/max word length in the config
*/ */

View File

@ -1,3 +0,0 @@
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_max_word_len', '254');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_min_word_len', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_ts_name', 'default');

View File

@ -124,6 +124,9 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_co
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_load_upd', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_max_chars', '14');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_native_min_chars', '3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_max_word_len', '254');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_min_word_len', '4');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('fulltext_postgres_ts_name', 'simple');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('hot_threshold', '25');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('icons_path', 'images/icons');