mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -793,7 +793,7 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
|
|
||||||
if (!isset($this->stats['post_content']))
|
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);
|
$this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
|
||||||
|
|
Loading…
Add table
Reference in a new issue