[ic] mv_coordinate with mv_range_look in Interchange

Greg Hanson greg@valuemedia.com
Tue, 14 Nov 2000 19:14:32 -0800

Hi all,

I am trying to add a min max price limit to my srchform page.  I read in the
MV mail list that Mike had removed the ability for mv_range_look in a
mv_coordinate search.  Mike includes a work around shown below, but I am
unable to make that work, and I believe I have accurately transposed his
example to my current application, also shown below.  Anyone have ideas on
this?  (note- I believe what Mike is directing here is simply to create 2
additional searches on the field that you are attempting to do the range
search on, in this case "price", and use mv_column_op to define 'greater
than equal to' in one case, and 'less than equal to' in the other, but as I
said I am unable to get this to work. I also noted that Mike left
mv_range_look in this example?)
I took out the ability to combine range look with coordinated search, and
I think I documented that in WHATSNEW. The reasons were performance, code
complexity, and correctness. If you are strong of stomach, try reading
the get_limit subroutine in Search.pm. 8-)

You can do instead:

 <FORM ACTION="[area search]" METHOD=POST><INPUT TYPE=hidden
NAME="mv_search_map" VALUE="

                <INPUT TYPE=hidden NAME="mv_column_op" VALUE=">=">
                <INPUT TYPE=hidden NAME="mv_column_op" VALUE="<=">
                <INPUT TYPE=hidden NAME="mv_numeric" VALUE=1>
                <INPUT TYPE=hidden NAME="mv_numeric" VALUE=1>

                <INPUT TYPE=hidden NAME="mv_search_field" Value="author">
                <INPUT TYPE=hidden NAME="mv_search_field" Value="title">
                <INPUT TYPE=hidden NAME="mv_search_field" Value="0">
                <INPUT TYPE=hidden NAME="mv_search_field" Value="verlag">
                <INPUT TYPE=hidden NAME="mv_search_field" Value="erjahr">
                <INPUT TYPE=hidden NAME="mv_search_field" Value="erjahr">
                <INPUT TYPE=hidden NAME="mv_search_match_count" Value="0">
                <INPUT TYPE=hidden NAME="mv_coordinate" VALUE="yes">
                <INPUT TYPE="hidden" NAME="mv_matchlimit" VALUE="10">
                <INPUT TYPE="hidden" NAME="mv_min_string" VALUE="3">

 [L]Author[/L] :<INPUT NAME=search12 VALUE="">
 [L]Title[/L]-[L]Catchword[/L] :<INPUT NAME=search14 VALUE="Kind">
 [L]Code[/L] :<INPUT NAME=search1 VALUE="">
 [L]Publisher[/L] :<INPUT NAME=search11 VALUE="">

 <INPUT TYPE=hidden NAME=mv_range_look VALUE=erjahr>
 min. <INPUT TYPE=text NAME=search_min VALUE=2000>
 max. <INPUT TYPE=text NAME=search_max VALUE=2000>

 <INPUT TYPE="hidden" NAME="mv_first_match" VALUE=""></TD>
 <INPUT TYPE="hidden" NAME="mv_doit" VALUE="search">
 <INPUT TYPE=image SRC="icon/[L]Search[/L].gif" BORDER=0
 <INPUT TYPE="hidden" NAME="mv_searchtype" VALUE="text">

<-end snip->

I have the following on my page:

<FORM ACTION="[area search]" METHOD=POST>
					<INPUT TYPE="hidden" NAME="mv_search_map" VALUE="

					<input TYPE="hidden" NAME="mv_column_op" VALUE=">=">
					<input TYPE="hidden" NAME="mv_column_op" VALUE="<=">
					<input TYPE="hidden" NAME="mv_numeric" VALUE="1">
					<input TYPE="hidden" NAME="mv_numeric" VALUE="1">
					<input TYPE="hidden" NAME="sf" VALUE="descr">
					<INPUT TYPE="hidden" NAME="sf" VALUE="grp">
					<INPUT TYPE="hidden" NAME="sf" VALUE="manu_part">
					<INPUT TYPE="hidden" NAME="sf" VALUE="part_num">
					<INPUT TYPE="hidden" NAME="sf" VALUE="price">
					<INPUT TYPE="hidden" NAME="sf" VALUE="price">
					<input TYPE="hidden" NAME="mv_coordinate" VALUE="yes">
					<input TYPE="hidden" NAME="mv_search_page" VALUE="results">
					<input TYPE="hidden" NAME="mv_sort_field" VALUE="vend_name">
					<input TYPE="hidden" NAME="ml" VALUE="25">

<input TYPE="text" SIZE="30" NAME="searchtext">

<SELECT size="1" name="searchcat" style="FONT-FAMILY: Verdana; FONT-SIZE:
				<OPTION value="" selected>Any Category</option>
					[loop search="

				<OPTION value="[loop-data grp grp]">[loop-data grp descr]</OPTION>

<INPUT maxlength="50" name="searchmfr">
<INPUT maxlength="50" name="searchitem">
<INPUT maxlength="7" name="search_min" size="10">&nbsp;&nbsp;&nbsp;&nbsp;To
<INPUT maxlength="7" name="search_max" size="10"></FONT>
<input type="hidden" NAME="mv_doit" VALUE="search">
<input type="submit" VALUE="search">

<-end snip->

I do not have <INPUT TYPE="hidden" name="mv_range_look" value="price"> on
this example, when I insert it I get the error  "Sorry, there was an error
in processing this form action.  Please report the error or try again later.
(Can't use an undefined value as an ARRAY reference at
/usr/local/interchange/lib/Vend/TextSearch.pm line 144.)

Error log says:  Range look not compatible with mv_coordinate. Disabling.

So obviously they are not compatible, and it does not appear that Mikes "do
instead" will work with the current  Interchange 4.6, although I am more
inclined to think I have made some sort of error here....(-:
Any clues as to what I may be doing wrong or missing?

Greg Hanson

2445 NE Division
Waterside Bldg, Suite 303
Bend, OR 97701

Toll Free		1-877-631-2888
Phone		1-541-388-0100
Fax		1-541-388-0200
URL  http://www.valuemedia.com