[ic] intricate search, where am I going wrong?

Paul Jordan interchange-users@interchange.redhat.com
Tue Apr 30 16:35:00 2002


Hi

I am trying to make a simle search engine and an advanced search engine. I
am having a problem with my advanced search engine.

# I have as the norm:

<form action="[area search]" method=post>
<input type=hidden name=mv_session_id value="[data session id]">
<INPUT TYPE=hidden NAME=mv_coordinate VALUE=1>
<INPUT TYPE=hidden NAME=mv_searchtype VALUE=sql>
<INPUT TYPE=hidden NAME=mv_range_look VALUE=searched>
<INPUT TYPE=hidden NAME=mv_range_min VALUE=1>
<INPUT TYPE=hidden NAME=mv_range_max VALUE=2>
<input type=hidden name="mv_sort_field" value="sku">




# Now I collect my customers input for MUST MATCH (this works):

<INPUT TYPE=hidden name=mv_search_field value="*">
<INPUT MAXLENGTH=30 NAME=mv_searchspec type=text size=12>
<INPUT TYPE=hidden NAME=mv_column_op VALUE=eq>




# Now I collect what category they want to look in, ***Or all pertaining
categories (not working):

<input type=hidden name=mv_search_field value="prod_group">
<select name=mv_searchspec>
   <option value=":image:ipix:stereo">All  ## want to be "or" separated
values
   <option value="image">Image
   <option value="ipix">Ipix
   <option value="stereo">Stereo
</select>
<INPUT TYPE=hidden NAME=mv_column_op VALUE=eq>




# Now I collect input to EXCLUDE MATCHES that have these keywords, if they
search for "water" they may not mean "drinking" water, and so on... (not
working)

<INPUT MAXLENGTH=30 NAME=mv_searchspec type=text size=12>
<INPUT TYPE=hidden NAME=mv_column_op VALUE=ne>




# And a select for choosing how many results to display per page (this
works):

<select name=mv_matchlimit size=12>
		<option value="[control matches 12]">12
		<option value="[control matches 18]">18
            <option value="[control matches 24]">24
	      </select>


And a button:

<input type="image" alt="Search I|M" border="0"
src="__BUTTON_DIR__/search.gif"></form>


The Exlusion of matches is not working, and the "all" categories in the
select box is not working. Can somebody give me a hint. I have searched and
searched but keep coming up with how to search multiple fields, instead of
searching with multiple "or" specs in one field. IOW:

[snip]
<input type=hidden name=mv_search_field value="prod_group">
<select name=mv_searchspec>
   <option value=":image:ipix:stereo">All  ## want to be "or" separated
values
   <option value="image">Image
   <option value="ipix">Ipix
[/snip]

By selecting "All", I wuld find:

foo AND image
foo AND ipix
foo AND stereo

not foo AND image AND ipix AND stereo

Thanks for any <input>

Paul