From 58303aa5df6642731f26ba06a799783796960582 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Wed, 5 Jul 2006 04:11:20 +0000 Subject: [PATCH] Change hard-coded vector fields to variables. --- includes/SearchPostgres.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/SearchPostgres.php b/includes/SearchPostgres.php index cece4e33f9..8e36b0b56c 100644 --- a/includes/SearchPostgres.php +++ b/includes/SearchPostgres.php @@ -99,7 +99,7 @@ class SearchPostgres extends SearchEngine { $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 p.vector @@ to_tsquery('$match')"; + "AND r.rev_text_id = t.old_id AND $fulltext @@ to_tsquery('$match')"; ## Redirects if (! $this->showRedirects) @@ -113,7 +113,7 @@ class SearchPostgres extends SearchEngine { $query .= " AND page_namespace IN ($namespaces)"; } - $query .= " ORDER BY rank(p.vector, to_tsquery('$fulltext')) DESC"; + $query .= " ORDER BY rank($fulltext, to_tsquery('$fulltext')) DESC"; $query .= $this->db->limitResult( '', $this->limit, $this->offset ); -- 2.20.1