[pLog-svn] r475 - plog/trunk/class/dao

oscar at devel.plogworld.net oscar at devel.plogworld.net
Mon Dec 13 10:12:11 GMT 2004


Author: oscar
Date: 2004-12-13 10:12:10 +0000 (Mon, 13 Dec 2004)
New Revision: 475

Modified:
   plog/trunk/class/dao/searchengine.class.php
Log:
corrected the queries that search for posts, but I still think that it is not working very well... it is 
finding too many posts!


Modified: plog/trunk/class/dao/searchengine.class.php
===================================================================
--- plog/trunk/class/dao/searchengine.class.php	2004-12-13 10:11:17 UTC (rev 474)
+++ plog/trunk/class/dao/searchengine.class.php	2004-12-13 10:12:10 UTC (rev 475)
@@ -163,8 +163,8 @@
             // Make the whole sql query string
             $searchQuery = "SELECT a.id AS id, a.date AS date,
 			                a.user_id AS user_id, a.blog_id AS blog_id, a.num_reads AS num_reads, 
-							a.properties AS properties, a.normalized_text AS normalized_text,
-							a.mangled_topic AS mangled_topic, a.status AS status, a.slug AS slug,
+							a.properties AS properties, t.normalized_text AS normalized_text,
+							t.mangled_topic AS mangled_topic, a.status AS status, a.slug AS slug,
 							1 AS relevance
                             FROM {$prefix}articles a, {$prefix}articles_text t
                             WHERE {$where_string} AND a.status = $status";
@@ -252,10 +252,10 @@
             $prefix      = $this->getPrefix();
 			$query       = $this->_adaptSearchString($query);
 
-            $searchQuery = "SELECT a.id AS id, a.topic AS topic, a.text AS text, a.date AS date,
+            $searchQuery = "SELECT a.id AS id, t.topic AS topic, t.text AS text, a.date AS date,
 			                       a.user_id AS user_id, a.blog_id AS blog_id, a.num_reads AS num_reads, 
-							       a.properties AS properties, a.normalized_text AS normalized_text,
-							       a.mangled_topic AS mangled_topic, a.status AS status, a.slug AS slug,
+							       a.properties AS properties, t.normalized_text AS normalized_text,
+							       t.mangled_topic AS mangled_topic, a.status AS status, a.slug AS slug,
 							       1 AS relevance 
 							 FROM {$prefix}custom_fields_values v, {$prefix}articles a 
 							 WHERE (v.field_value LIKE '%{$query}%') AND v.article_id = a.id AND a.status = $status";
@@ -305,10 +305,10 @@
             $where_string .= ")";            
 
             // Make the whole sql query string
-            $searchQuery = "SELECT a.id AS id, a.topic AS topic, a.text AS text, a.date AS date,
+            $searchQuery = "SELECT a.id AS id, t.topic AS topic, t.text AS text, a.date AS date,
 			                       a.user_id AS user_id, a.blog_id AS blog_id, a.num_reads AS num_reads, 
-							       a.properties AS properties, a.normalized_text AS normalized_text,
-							       a.mangled_topic AS mangled_topic, a.status AS status, a.slug AS slug, 
+							       a.properties AS properties, t.normalized_text AS normalized_text,
+							       t.mangled_topic AS mangled_topic, a.status AS status, a.slug AS slug, 
 							       1 AS relevance 
 							 FROM {$prefix}articles_comments c, {$prefix}articles a 
 							 WHERE {$where_string} AND c.article_id = a.id AND a.status = $status AND c.status = 0";




More information about the pLog-svn mailing list