Skip to main content.
home | support | download

Back to List Archive

command line syntax when searching for multiple fields

From: Cas Tuyn <cas.tuyn(at)not-real.gmail.com>
Date: Wed Nov 01 2006 - 12:21:06 GMT
Hi,

To create advanced search I added two extra search boxes, author and
costcenter.
Field names are: QUERY, au and cc

Inside my Perl script I have:

foreach $option(@options) {
	($name, $value)=split('=', $option);
	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\" |");

so the URL contains:  search.pl?QUERY=&au=cas&cc=nl017016
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:
    search.pl?QUERY=&au=&cc=nl017016
I find nothing, and in combination with author it does not make a
difference with or without costcenter.

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

I already verified that Swish-e knows the 'costc' metaname, I can even
show it in the search output if I place "costc" between the "-p
description" and "author" in the command, then I see the costcenter
instead of the authorname in the search output.

My config = Swish-e 2.4.3 on Solaris 2.8

Regards,

Cas
Received on Wed Nov 1 04:21:35 2006