[Fusionforge-commits] FusionForge branch master updated. 24b796c81742677ae7e57408dbd76c04f6df3c40

Alain Peyrat aljeux at fusionforge.org
Mon May 27 14:36:56 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  24b796c81742677ae7e57408dbd76c04f6df3c40 (commit)
      from  5652eb6d283c20d8b734f6bf77d4abb8702fa077 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 24b796c81742677ae7e57408dbd76c04f6df3c40
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Mon May 27 14:36:49 2013 +0200

    Several fixes when searching on docs

diff --git a/src/common/search/DocsSearchQuery.class.php b/src/common/search/DocsSearchQuery.class.php
index c252c87..a4adb42 100644
--- a/src/common/search/DocsSearchQuery.class.php
+++ b/src/common/search/DocsSearchQuery.class.php
@@ -102,7 +102,7 @@ class DocsSearchQuery extends SearchQuery {
 		$qpa = db_construct_qpa () ;
 
 		$qpa = db_construct_qpa ($qpa,
-					 'SELECT x.* FROM (SELECT doc_data.docid, doc_data.filename, ts_headline(doc_data.title, q) AS title, ts_headline(doc_data.description, q) AS description, doc_groups.groupname, title||$1||description AS full_string_agg, doc_data_idx.vectors FROM doc_data, doc_groups, doc_data_idx, to_tsquery($2) AS q',
+					 'SELECT x.* FROM (SELECT doc_data.docid, doc_data.filename, ts_headline(doc_data.title, q) AS title, ts_headline(doc_data.description, q) AS description, doc_groups.groupname, doc_data.title||$1||description AS full_string_agg, doc_data_idx.vectors FROM doc_data, doc_groups, doc_data_idx, to_tsquery($2) AS q',
 					 array ($this->field_separator,
 						$words)) ;
 		$qpa = db_construct_qpa ($qpa,
@@ -126,11 +126,11 @@ class DocsSearchQuery extends SearchQuery {
 		$qpa = db_construct_qpa ($qpa,
 					 ') AS x ') ;
 		if (count($this->phrases)) {
-			$qpa = db_construct_qpa ('WHERE ') ;
+			$qpa = db_construct_qpa($qpa, 'WHERE ') ;
 			$qpa = $this->addMatchCondition($qpa, 'full_string_agg');
 		}
 		$qpa = db_construct_qpa ($qpa,
-					 ' ORDER BY groupname ASC, ts_rank(vectors, to_tsquery($1)) DESC, title ASC',
+					 ' ORDER BY ts_rank(vectors, to_tsquery($1)) DESC, groupname ASC, title ASC',
 					 array($words)) ;
 		return $qpa ;
 	}

-----------------------------------------------------------------------

Summary of changes:
 src/common/search/DocsSearchQuery.class.php |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list