mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/11040] Swap post_text and post_subject for post_content index
Provides better performance as per PostgreSQL Docs. PHPBB3-11040
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user