ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
[PHP] How to account for misspellings and alternatives in searching?
by Chris W. Parker other posts by this author
Oct 27 2005 12:33PM messages near this date
Re: [PHP] Trouble using DOM component with PHP 4.4.0 | Re: [PHP] How to account for misspellings and alternatives in searching?
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.

1. I could add a field to the db for each product that would be used for
associated words for a product as well as misspellings.

PROS: Very customizable on an individual product level.
CONS: Would need to be updated for each and every product individually.

2. Make a field for each manufacturer's record for alternate
spellings/keywords.

PROS: Little administrative overhead.
CONS: Is only manufacturer name based and could not account for specific
products.

3. Both #1 and #2.

PROS: Flexible.
CONS: Lots of administrative overhead.

4. A one-to-many table that associates individual words with product
skus. This one is pretty much the opposite of #1 with one key
difference: the interface. It would be probably be easier to enter a
desired word and then choose each sku from a multi-select dropdown than
it would be to go from product to product entering one word at a time.

5. I'm not sure how this would be accomplished from a technical
standpoint but it would be nice to have the program know that when
someone types in "511" they really meant "5.11". Or (hopefully this
isn't a bad example) if they type in "dessert" (as in cake and icecream)
they really meant "desert" (as in snakes and sand).

In my case that wouldn't be a bad assumption since our site will never
contain the word desert unless it's a misspelling.


What does everyone think? What other options are out there?



Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Chris W. Parker
Robin Vickery
James Benson
Jochem Maas

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved