[ic] Swish search with wildcard

Music music at labyrinth.net.au
Thu Dec 10 00:28:08 UTC 2009

>> 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
> matches?
> Anybody with more Swish knowledge hopefully know this.

I scoured the Swish documentation several times and from what I understand 
there is no wildcard option via config or spidering. They essentially deal 
with it using Fuzzy searching, but because this is dictionary based it 
doesn't deal well with things like model numbers and product codes.

Happy to be corrected but I think the only way swish is going to be useful 
for a commerce site where users are searching for product numbers is if a 
wildcard can be injected after a keyword. (or if mv_substring_match would 

One thing is that swish doesn't support a wildcard at the start of a word.

If lib/Vend/Swish.pm could be adjusted so that * appeared at the of every 
search term that would solve it otherwise I was thinking trying javascript 
to adjust form value. 

More information about the interchange-users mailing list