[interchange-cvs] interchange - racke modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu Oct 9 14:43:42 UTC 2008


User:      racke
Date:      2008-10-09 14:43:42 GMT
Modified:  .        WHATSNEW-5.7
Modified:  lib/Vend Swish.pm
Log:
* Refining searches with properties in Swish search:

    sf=distribution
    se=lenny

    se=postgresql

  This also reverts the workaround for #111.

Revision  Changes    Path
2.16                 interchange/WHATSNEW-5.7


rev 2.16, prev_rev 2.15
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.15
retrieving revision 2.16
diff -u -r2.15 -r2.16
--- WHATSNEW-5.7	1 Oct 2008 18:28:57 -0000	2.15
+++ WHATSNEW-5.7	9 Oct 2008 14:43:42 -0000	2.16
@@ -39,6 +39,15 @@
   This is now mitigated by an empty mv_results array and results in a search
   error as one would expect.
 
+* Refining searches with properties in Swish search:
+
+    sf=distribution
+    se=lenny
+
+    se=postgresql
+
+  This also reverts the workaround for #111.
+
 UserTag
 -------
 



1.15                 interchange/lib/Vend/Swish.pm


rev 1.15, prev_rev 1.14
Index: Swish.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Swish.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Swish.pm	17 May 2008 14:34:42 -0000	1.14
+++ Swish.pm	9 Oct 2008 14:43:42 -0000	1.15
@@ -1,6 +1,6 @@
 # Vend::Swish - Search indexes with Swish-e's new SWISH::API
 #
-# $Id: Swish.pm,v 1.14 2008-05-17 14:34:42 jon Exp $
+# $Id: Swish.pm,v 1.15 2008-10-09 14:43:42 racke Exp $
 #
 # Adapted from earlier Vend::Swish by Brian Miller <brian at endpoint.com>
 #
@@ -26,7 +26,7 @@
 require Vend::Search;
 @ISA = qw(Vend::Search);
 
-$VERSION = substr(q$Revision: 1.14 $, 10);
+$VERSION = substr(q$Revision: 1.15 $, 10);
 use strict;
 
 use SWISH::API;
@@ -226,15 +226,7 @@
 		}
 	}
 	
-	#
-	#	bug alert (make your own klaxon sound here)
-	#	-------------------------------------------.
-	#	uncommenting the following line causes the [on-match] and
-	#	[no-match] blocks to reverse their meaning.  This has something
-	#	to do with the resulting "matches" count, but I haven't looked
-	#	into it properly
-	#
-	# $search_string = $s->build_search(\@pats);
+	$search_string = $s->build_search(\@pats);
 
 #::logDebug("Swish search string is $search_string within " . join(', ', @sf));
 	
@@ -361,7 +353,7 @@
 	for (my $i = 0; $i < $field_count; $i++) {
 		
 		# validate $group first
-		if (@sf) {
+		if (@sf > $i) {
 			push (@{$specs_by_group[$group[$i]]}, ["$sf[$i] = $pats->[$i]", $s->{mv_orsearch}->[$i]]);
 		} else {
 #			if ($su[$i]) {







More information about the interchange-cvs mailing list