mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-22 19:07:27 +01: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:
parent
1094a2b577
commit
932e0eb17e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user