Skip to main content.
home | support | download

Back to List Archive

Re: command line syntax when searching for multiple fields

From: Bill Moseley <moseley(at)>
Date: Wed Nov 01 2006 - 14:04:49 GMT
On Wed, Nov 01, 2006 at 04:16:19AM -0800, Cas Tuyn wrote:

> 	($name, $value)=split('=', $option);

Split takes a pattern.

> 	if ($name eq "QUERY") {
> 		$query=$value;
> 	}
> 	if ($name eq "P") {
> 		$position = $value;
> 	}
> 	if ($name eq "au") {
> 		$qauthor = $value;
> 	}
> 	if ($name eq "cc") {
> 		$qcc = $value;
> 	}
> }
> open (SWISH, "/web/bin/swish-e-2.4.3/bin/swish-e -f $index -H 9 -d ::
> -b $position -m 10 -p description author -w $query \"author=$qauthor\"
> \"costc=$qcc\" |");

The above is very likely insecure.  It doesn't make sense when some of
the variables are undefined.

> so the URL contains:
> when I only search for author and costcenter
> My problem is that only the regular query and author fields seem to
> work. When I search exclusively for a costcenter:
> I find nothing, and in combination with author it does not make a
> difference with or without costcenter.

You mean when you generate a command like this it doesn't work?

   swish-e -w  author= costc=nl017016

I doubt that will work.  You are searching for author=costc

> Does anybody have tips to search for self-generated Metanames?

Construct the command correctly -- don't specify metanames with blank

If you want to write your own script in Perl then read up on CGI
security and look into using standard perl modules and read perldoc

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Wed Nov 1 06:04:52 2006