[Fusionforge-commits] r14111 - in branches/Branch_5_1: . src/common/search

Roland Mas lolando at fusionforge.org
Fri Aug 12 14:54:58 CEST 2011


Author: lolando
Date: 2011-08-12 14:54:58 +0200 (Fri, 12 Aug 2011)
New Revision: 14111

Modified:
   branches/Branch_5_1/
   branches/Branch_5_1/src/common/search/ProjectSearchQuery.class.php
Log:
Reverting part of the last commit, wasn't meant to be committed

Modified: branches/Branch_5_1/src/common/search/ProjectSearchQuery.class.php
===================================================================
--- branches/Branch_5_1/src/common/search/ProjectSearchQuery.class.php	2011-08-12 12:50:53 UTC (rev 14110)
+++ branches/Branch_5_1/src/common/search/ProjectSearchQuery.class.php	2011-08-12 12:54:58 UTC (rev 14111)
@@ -52,7 +52,7 @@
 			if (count ($this->words)) {
 				$words = $this->getFormattedWords();
 				$qpa = db_construct_qpa ($qpa,
-							 'SELECT DISTINCT ON (rank(vectors, q), group_name) type_id, g.group_id, ts_headline(group_name, q) as group_name, unix_group_name, headline(short_description, q) as short_description FROM groups AS g, to_tsquery($1) AS q WHERE g.status in ($2, $3) ',
+							 'SELECT DISTINCT ON (rank(vectors, q), group_name) type_id, g.group_id, headline(group_name, q) as group_name, unix_group_name, headline(short_description, q) as short_description FROM groups AS g, to_tsquery($1) AS q, groups_idx as i WHERE g.status in ($2, $3) ',
 							 array ($words,
 								'A',
 								'H')) ;
@@ -76,15 +76,12 @@
 				$qpa = $this->addMatchCondition($qpa, 'unix_group_name');
 				$qpa = db_construct_qpa ($qpa,
 							 ') ') ;
-			} else {
-				$qpa = db_construct_qpa ($qpa,
-							 'TRUE') ;
-			}				
+			}
 			$qpa = db_construct_qpa ($qpa,
 						 ') ') ;
 			if (count ($this->words)) {
 				$qpa = db_construct_qpa ($qpa,
-							 'ORDER BY rank(vectors, q) DESC, group_name') ;
+							 'AND g.group_id = i.group_id ORDER BY rank(vectors, q) DESC, group_name') ;
 			} else {
 				$qpa = db_construct_qpa ($qpa,
 							 'ORDER BY group_name') ;




More information about the Fusionforge-commits mailing list