Re: How to account for misspellings and alternatives in searching?
| From: | Robin Vickery | Date: | Fri, 28 Oct 2005 08:58:17 +0000 |
| Subject: | Re: How to account for misspellings and alternatives in searching? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224760@lists.php.net to get a copy of this message | ||
On 10/27/05, Chris W. Parker <cparker@swatgear.com> wrote:
> Hello,
>
> On my site right now if someone searches for "511" (a misspelling of the
> manufacturer 5.11) they are not presented with the right products
> because 511 is not found anywhere in the database.
>
> I've got a few ideas on how to solve this but I want to find one that
> requires as little administrative overhead as possible.
You could use the pspell extension; add your manufacturers to your
personal word-list and use pspell_check() to check the spelling and
pspell_suggest() to suggest alternatives.
http://www.php.net/manual/en/ref.pspell.php
-robin