diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2013-11-08 18:56:36 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2014-03-12 11:02:04 +0530 |
commit | 932e0eb17e9d1869eb4b1e76100c6848823780d0 (patch) | |
tree | 31655e22682e29bf337a7ecdd51594a30450c7d7 | |
parent | 1094a2b577b79c7c456ce34d42fb5ce345297a41 (diff) | |
download | forums-932e0eb17e9d1869eb4b1e76100c6848823780d0.tar forums-932e0eb17e9d1869eb4b1e76100c6848823780d0.tar.gz forums-932e0eb17e9d1869eb4b1e76100c6848823780d0.tar.bz2 forums-932e0eb17e9d1869eb4b1e76100c6848823780d0.tar.xz forums-932e0eb17e9d1869eb4b1e76100c6848823780d0.zip |
[ticket/11040] Swap post_text and post_subject for post_content index
Provides better performance as per PostgreSQL Docs.
PHPBB3-11040
-rw-r--r-- | phpBB/phpbb/search/fulltext_postgres.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php index cb50ce69f0..63caeffcc5 100644 --- a/phpBB/phpbb/search/fulltext_postgres.php +++ b/phpBB/phpbb/search/fulltext_postgres.php @@ -793,7 +793,7 @@ class fulltext_postgres extends \phpbb\search\base if (!isset($this->stats['post_content'])) { - $this->db->sql_query("CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_content ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_subject || ' ' || post_text))"); + $this->db->sql_query("CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_content ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_text || ' ' || post_subject))"); } $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE); |