--- trunk/WebPac.pm 2003/11/16 16:57:11 149 +++ trunk/WebPac.pm 2003/11/16 22:39:06 150 @@ -95,7 +95,8 @@ my @persist_vars = ( 'rm' ); my @url_params = ( 'rm=results', 'show_full=1', 'last_PAGER_offset='.$q->param('PAGER_offset') || 0 ); - for(my $i = 1; $i <=30; $i++) { + # support parametars "f" and "v" for start + for(my $i = ""; $i <=30; $i++) { return show_index($self, $i) if ($q->param("f".$i."_index")); @@ -108,6 +109,9 @@ push @url_params,"f$i=".$q->url_param("f$i"); push @url_params,"v$i=".$q->url_param("v$i"); + my $wc="*"; # swish wildcard + $wc="" if ($i eq ""); # don't apply wildcard on field 0 + # re-write query from +/- to and/and not my @param_vals = $q->param("v$i"); my @swish_q; @@ -125,14 +129,14 @@ if (m/^([+-])(\S+)/) { $s.= ($s) ? "and " : ""; $s.="not " if ($1 eq "-"); - $s.="$2* "; + $s.="$2$wc "; } elsif (m/^\s*(and|or|not)\s*$/i) { $s.="$_ "; # don't add * to words with less than x chars } elsif (length($_) <= $MIN_WILDCARD) { $s.="$_ "; } else { - $s.="$_* "; + $s.="$_$wc "; } } $s =~ s/\*+/*/g;