Re: [PHP] Re: How to account for misspellings and alternatives in searching?
by Jochem Maas other posts by this author
Oct 28 2005 1:33AM messages near this date
[PHP] Re: How to account for misspellings and alternatives in searching?
|
[PHP] Using PHP for accsess control, preventing access to static files
James Benson wrote:
> Not sure about the numbers but soundex could be useful
>
> http://php.net/soundex
right and maybe its easier to just index thing like '5.11' as
'511' - ie just stripping off everything not alphanumeric ...
amnd doing the same with whatever people search on. I have used
a similar technique to make it easier to search for text/words that
contains letters with diacrites (e.g. 'e acute' becomes a plain 'e')
and never underestimate a users ability to start writing about eating
dessert in the desert, no doubt they had sandcakes. ;-)
>
>
>
> James
>
>
> Chris W. Parker 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.
> >
> > 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
|