summaryrefslogtreecommitdiff
path: root/includes/SearchPostgres.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/SearchPostgres.php')
-rw-r--r--includes/SearchPostgres.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/SearchPostgres.php b/includes/SearchPostgres.php
index 8e36b0b5..faf53f02 100644
--- a/includes/SearchPostgres.php
+++ b/includes/SearchPostgres.php
@@ -98,8 +98,8 @@ class SearchPostgres extends SearchEngine {
$match = $this->parseQuery( $filteredTerm, $fulltext );
$query = "SELECT page_id, page_namespace, page_title, old_text AS page_text ".
- "FROM page p, revision r, text t WHERE p.page_latest = r.rev_id " .
- "AND r.rev_text_id = t.old_id AND $fulltext @@ to_tsquery('$match')";
+ "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " .
+ "AND r.rev_text_id = c.old_id AND $fulltext @@ to_tsquery('default','$match')";
## Redirects
if (! $this->showRedirects)
@@ -113,7 +113,7 @@ class SearchPostgres extends SearchEngine {
$query .= " AND page_namespace IN ($namespaces)";
}
- $query .= " ORDER BY rank($fulltext, to_tsquery('$fulltext')) DESC";
+ $query .= " ORDER BY rank($fulltext, to_tsquery('default','$fulltext')) DESC";
$query .= $this->db->limitResult( '', $this->limit, $this->offset );