[ic] Search problem when mixing words around.

Gert van der Spoel gert at 3edge.com
Fri Aug 28 16:20:36 UTC 2009

> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Rick Bragg
> Sent: Friday, August 28, 2009 1:26 AM
> To: interchange-users at icdevgroup.org
> Subject: [ic] Search problem when mixing words around.
> Hi,
> I have a simple search form that I can't seem to get to work properly.
> following is a sample of my simple form:
> <form action="[area search]" method=post>
> [form-session-id]
>  <INPUT TYPE=hidden NAME=mv_coordinate VALUE="1">
>  <INPUT TYPE=hidden NAME=mv_searchtype VALUE="db">
>  <INPUT MAXLENGTH=30 NAME=mv_searchspec type=text size=15>
>  <INPUT TYPE=hidden NAME=mv_search_field VALUE=":description:comment">
>  <INPUT TYPE=hidden
> 	NAME=mv_column_op
> 	VALUE="rm">
>  <INPUT TYPE=hidden NAME=mv_substring_match VALUE="1">
>  <INPUT TYPE=hidden NAME=mv_all_chars VALUE="1">
>  <INPUT TYPE=hidden NAME=mv_exact_match VALUE="0">
>  <INPUT TYPE=hidden NAME=mv_matchlimit VALUE="[control matches 25]">
>  <INPUT TYPE=hidden NAME=mv_sort_field VALUE="description">
>  <input type=submit value="[L]SEARCH[/L]" class="search_button">
> </form>
> It seems that it is doing substring matches fine. For example, I search
> for "icycl" and it finds everything with "bicycle" perfectly.  I can
> also search for "fixed gear" or "ixed gea" and it finds everything with
> "fixed gear" perfectly.
> However, if I search for "gear fixed" it finds nothing and I get an
> error...
>      Errors:
>      Unknown mv_column_op (ARRAY(0x533a890))
> So it seems that it can find substring fine, but for some reason it
> can't find things where words are rearranged.
> Am I doing something wrong, or is this the right behavior?  Is there a
> simple way to fix this so that searches for things like "gear fixed"
> return rows with "fixed gear" in them?
> Thanks!
> Rick

I copied the above and tested in on my local version and I have not been
able to reproduce.

Search for 'rgo rol'  and it will give you 'ergo roller'
Search for 'roller ergo' and it will give you 'no matches found' ....

The reason that it returns (ARRAY(0x533a890)) is because in
lib/Vend/Search.pm at some point you will find:
$s->search_error("Unknown mv_column_op (%s)",$o);       (search for
'Unknown' will give you one location).

$o is a scalar containing the op ...

However sub search_error has:
 my ($s, $msg, @args) = @_;

 $o ends up in @args ... 

That does not seem right to me ... 



More information about the interchange-users mailing list