[interchange-cvs] interchange - racke modified lib/Vend/Swish2.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Jun 23 10:34:43 EDT 2006


User:      racke
Date:      2006-06-23 14:34:42 GMT
Modified:  lib/Vend Swish2.pm
Log:
add missing autoproperty, map custom properties by their name

Revision  Changes    Path
1.5       +7 -6      interchange/lib/Vend/Swish2.pm


rev 1.5, prev_rev 1.4
Index: Swish2.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Swish2.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Swish2.pm	23 Jun 2006 14:18:23 -0000	1.4
+++ Swish2.pm	23 Jun 2006 14:34:42 -0000	1.5
@@ -1,6 +1,6 @@
 # Vend::Swish2 - Search indexes with Swish-e's new SWISH::API
 #
-# $Id: Swish2.pm,v 1.4 2006/06/23 14:18:23 racke Exp $
+# $Id: Swish2.pm,v 1.5 2006/06/23 14:34:42 racke Exp $
 #
 # Adapted from 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.4 $, 10);
+$VERSION = substr(q$Revision: 1.5 $, 10);
 use strict;
 
 use lib qw( /usr/local/lib/swish-e/perl );
@@ -57,6 +57,7 @@
              filesize    => 'swishdocsize',
              mod_date    => 'swishlastmodified',
              description => 'swishdescription',
+			 dbfile      => 'swishdbfile',
            );
 my %highlight_settings = ( show_words    => 8,
                            occurrences   => 5,
@@ -197,11 +198,11 @@
 	}
 	
 	for (@{ $s->{'mv_field_names'} }) {
-		if (exists $fmap{$_}) {
-			$prop = $fmap{$_};
-		} else {
-			$prop = $_;
+		unless (exists $fmap{$_}) {
+			$fmap{$_} = $_;
 		}
+		
+		$prop = $fmap{$_};
 		
 		unless (exists $prop_avail{$prop}) {
 			return $s->search_error("Unknown property '$prop'");








More information about the interchange-cvs mailing list