aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/search/fulltext_mysql.php
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-08-26 15:16:56 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-08-26 15:16:56 +0530
commit0228424983e35badc779923a1f0398fc3ab7c8b2 (patch)
tree910927b7f0fc92df32b0c478cd0a2389b90fa355 /phpBB/phpbb/search/fulltext_mysql.php
parentf7b967dc5af4415cee3938b784dda91dc196f772 (diff)
downloadforums-0228424983e35badc779923a1f0398fc3ab7c8b2.tar
forums-0228424983e35badc779923a1f0398fc3ab7c8b2.tar.gz
forums-0228424983e35badc779923a1f0398fc3ab7c8b2.tar.bz2
forums-0228424983e35badc779923a1f0398fc3ab7c8b2.tar.xz
forums-0228424983e35badc779923a1f0398fc3ab7c8b2.zip
[ticket/11621] Remove mysql extra indexes
Remove post_text index as post_content index is sufficient to search post text. PHPBB3-11621
Diffstat (limited to 'phpBB/phpbb/search/fulltext_mysql.php')
-rw-r--r--phpBB/phpbb/search/fulltext_mysql.php19
1 files changed, 3 insertions, 16 deletions
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php
index a1e1b089b9..eed962b833 100644
--- a/phpBB/phpbb/search/fulltext_mysql.php
+++ b/phpBB/phpbb/search/fulltext_mysql.php
@@ -779,7 +779,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
$alter[] = 'ADD FULLTEXT (post_subject)';
}
- if (!isset($this->stats['post_text']))
+ if (!isset($this->stats['post_content']))
{
if ($this->db->sql_layer == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>='))
{
@@ -789,11 +789,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
{
$alter[] = 'MODIFY post_text mediumtext NOT NULL';
}
- $alter[] = 'ADD FULLTEXT (post_text)';
- }
- if (!isset($this->stats['post_content']))
- {
$alter[] = 'ADD FULLTEXT post_content (post_subject, post_text)';
}
@@ -832,11 +828,6 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
$alter[] = 'DROP INDEX post_subject';
}
- if (isset($this->stats['post_text']))
- {
- $alter[] = 'DROP INDEX post_text';
- }
-
if (isset($this->stats['post_content']))
{
$alter[] = 'DROP INDEX post_content';
@@ -862,7 +853,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
$this->get_stats();
}
- return (isset($this->stats['post_text']) && isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false;
+ return (isset($this->stats['post_subject']) && isset($this->stats['post_content'])) ? true : false;
}
/**
@@ -902,11 +893,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
if ($index_type == 'FULLTEXT')
{
- if ($row['Key_name'] == 'post_text')
- {
- $this->stats['post_text'] = $row;
- }
- else if ($row['Key_name'] == 'post_subject')
+ if ($row['Key_name'] == 'post_subject')
{
$this->stats['post_subject'] = $row;
}