[ic] intermingle AND with OR search
Paul Jordan
interchange-users@interchange.redhat.com
Wed May 8 13:23:01 2002
Hi guys
I have a coordinated search here. The data is collected in a form and passed
to it.
[tmp goodwords][calc]
my @word = split /\s+/, $CGI->{findthis} || $Values->{findthis};
my $out;
foreach (@word) {
$out .= "sf=:*\nse=$_\nop=rm\nnu=0";
}
return $out;
[/calc][/tmp]
[tmp badwords][calc]
my @word = split /\s+/, $CGI->{exclude} || $Values->{exclude};
my $out;
foreach (@word) {
$out .= "sf=:*\nse=$_\nop=rn\nnu=0";
}
return $out;
[/calc][/tmp]
[search-region
more=1
search="
st=db
co=yes
sf=searched
se=1
op===
nu=1
[scratch goodwords]
[scratch badwords]
sf=prod_group
se=[value p_group]
op=eq
nu=0
ml=[value display]
sp=@@MV_PAGE@@
"]
------------------------------------------------
Ed Lafrance has made multiple word entries into single keywords to search
for with their own operators.
Problem. I have one more spec to read in. It is up there:
sf=prod_group
se=[value p_group]
op=eq
nu=0
This is fine if p_group is one value (ie: stereo). This value is read from a
select box, which logically will have value1 value2 value3 valueALL.
valueALL would be multiple values like:
image stereo ipix.
How can I integrate this into the coordinated search above so that if
"valueALL" is selected and passed, it will find image OR stereo OR ipix.
I know about orserach, but the search is an AND search, mostly. I need this
one part of it to in a sense be an orsearch.
Ideally something like:
sf=prod_group
se=ipix image stereo
op="space seperated values, need one to match"
nu=0
Thanks fellow ICans
Paul