mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.3.x'
This commit is contained in:
commit
cd94e90ab9
1 changed files with 15 additions and 1 deletions
|
@ -972,7 +972,12 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
|
|
||||||
if (!isset($this->stats['post_content']))
|
if (!isset($this->stats['post_content']))
|
||||||
{
|
{
|
||||||
$sql_queries[] = "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))";
|
$sql_queries[] = "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))";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($this->stats['post_subject_content']))
|
||||||
|
{
|
||||||
|
$sql_queries[] = "CREATE INDEX " . POSTS_TABLE . "_" . $this->config['fulltext_postgres_ts_name'] . "_post_subject_content ON " . POSTS_TABLE . " USING gin (to_tsvector ('" . $this->db->sql_escape($this->config['fulltext_postgres_ts_name']) . "', post_subject || ' ' || post_text))";
|
||||||
}
|
}
|
||||||
|
|
||||||
$stats = $this->stats;
|
$stats = $this->stats;
|
||||||
|
@ -1031,6 +1036,11 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
$sql_queries[] = 'DROP INDEX ' . $this->stats['post_content']['relname'];
|
$sql_queries[] = 'DROP INDEX ' . $this->stats['post_content']['relname'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($this->stats['post_subject_content']))
|
||||||
|
{
|
||||||
|
$sql_queries[] = 'DROP INDEX ' . $this->stats['post_subject_content']['relname'];
|
||||||
|
}
|
||||||
|
|
||||||
$stats = $this->stats;
|
$stats = $this->stats;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1117,6 +1127,10 @@ class fulltext_postgres extends \phpbb\search\base
|
||||||
{
|
{
|
||||||
$this->stats['post_content'] = $row;
|
$this->stats['post_content'] = $row;
|
||||||
}
|
}
|
||||||
|
else if ($row['relname'] == POSTS_TABLE . '_' . $this->config['fulltext_postgres_ts_name'] . '_post_subject_content' || $row['relname'] == POSTS_TABLE . '_post_subject_content')
|
||||||
|
{
|
||||||
|
$this->stats['post_subject_content'] = $row;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->db->sql_freeresult($result);
|
$this->db->sql_freeresult($result);
|
||||||
|
|
Loading…
Add table
Reference in a new issue