mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Enable/disable fulltext index updating
git-svn-id: file:///svn/phpbb/trunk@3844 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e9e95c8e1e
commit
11b76dcc8b
1 changed files with 22 additions and 1 deletions
|
@ -622,6 +622,13 @@ class fulltext_search
|
||||||
|
|
||||||
static $drop_char_match, $drop_char_replace, $stopwords, $synonyms;
|
static $drop_char_match, $drop_char_replace, $stopwords, $synonyms;
|
||||||
|
|
||||||
|
// Is the fulltext indexer disabled? If yes then we need not
|
||||||
|
// carry on ... it's okay ... I know when I'm not wanted boo hoo
|
||||||
|
if (empty($config['load_search_upd']))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($drop_char_match))
|
if (empty($drop_char_match))
|
||||||
{
|
{
|
||||||
$drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!', '*');
|
$drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!', '*');
|
||||||
|
@ -674,6 +681,13 @@ class fulltext_search
|
||||||
{
|
{
|
||||||
global $config, $db;
|
global $config, $db;
|
||||||
|
|
||||||
|
// Is the fulltext indexer disabled? If yes then we need not
|
||||||
|
// carry on ... it's okay ... I know when I'm not wanted boo hoo
|
||||||
|
if (empty($config['load_search_upd']))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// $mtime = explode(' ', microtime());
|
// $mtime = explode(' ', microtime());
|
||||||
// $starttime = $mtime[1] + $mtime[0];
|
// $starttime = $mtime[1] + $mtime[0];
|
||||||
|
|
||||||
|
@ -812,7 +826,14 @@ class fulltext_search
|
||||||
// words no longer referenced in the match table, etc.
|
// words no longer referenced in the match table, etc.
|
||||||
function search_tidy()
|
function search_tidy()
|
||||||
{
|
{
|
||||||
global $db;
|
global $db, $config;
|
||||||
|
|
||||||
|
// Is the fulltext indexer disabled? If yes then we need not
|
||||||
|
// carry on ... it's okay ... I know when I'm not wanted boo hoo
|
||||||
|
if (empty($config['load_search_upd']))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Remove common (> 60% of posts ) words
|
// Remove common (> 60% of posts ) words
|
||||||
$result = $db->sql_query("SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE);
|
$result = $db->sql_query("SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue