[ic] Swish search with wildcard

Gert van der Spoel gert at 3edge.com
Wed Dec 9 08:03:52 UTC 2009

> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-
> users-bounces at icdevgroup.org] On Behalf Of Music
> Sent: Wednesday, December 09, 2009 5:08 AM
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] Swish search with wildcard
> > The same thing occurs when using an IC search form. The item is only
> found
> > if the customer is smart enough to enter a * after the search term in
> the
> > form which is highly unlikely for most visitors.
> >
> > I have tried several different fuzzy index methods in swish and also
> > setting mv_substring_match to true however cannot find products like
> these
> > using IC and Swish-e.
> >
> > <form action="[area search]" method=post>
> > <INPUT TYPE=hidden NAME=mv_substring_match VALUE=1>
> > <INPUT TYPE=hidden NAME=mv_searchtype VALUE=swish>
> Just trying to get more info, is this what mv_substring_match does in a
> normal IC search but is this not expected to work when the search type
> is
> swish?
> Does mv_substring_match change submitted search form data so that it
> looks
> like:
> *searchterm*

Don't know much about Swish, but lib/Vend/Swish.pm has the following:
my @su = @{$s->{mv_substring_match}};

And then a bit later it has:
#                       if ($su[$i]) {
#                               push (@{$specs_by_group[$group[$i]]},
["*$pats->[$i]", $s->{mv_orsearch}->[$i]]);
#                       } else {
                                push (@{$specs_by_group[$group[$i]]},
[$pats->[$i], $s->{mv_orsearch}->[$i]]);
#                       }

Further to that @su is not being used in Swish.pm from what I can tell ... 

Perhaps there is a different solution with Swish to be able to do wildcard
Anybody with more Swish knowledge hopefully know this.



More information about the interchange-users mailing list