phpbb\search\fulltext_postgres::delete_index PHP Method

delete_index() public method

Drop fulltext index
public delete_index ( $acp_module, $u_action ) : string | boolean
return string | boolean error string is returned incase of errors otherwise false
    public function delete_index($acp_module, $u_action)
    {
        // Make sure we can actually use PostgreSQL with fulltext indexes
        if ($error = $this->init()) {
            return $error;
        }
        if (empty($this->stats)) {
            $this->get_stats();
        }
        if (isset($this->stats['post_subject'])) {
            $this->db->sql_query('DROP INDEX ' . $this->stats['post_subject']['relname']);
        }
        if (isset($this->stats['post_content'])) {
            $this->db->sql_query('DROP INDEX ' . $this->stats['post_content']['relname']);
        }
        $this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
        return false;
    }