I’m just looking for some direction on the best way to implement this
and I’m not sure if there is a ton of info out there on this, but I’m
just searching under the wrong terminology.
I have a MySql database that contains a table of products. Each
product has a field for the “product name”, “store”, “city”, “state”,
“price”. When someone adds a new product record I’d like to validate
the record against the existing database and check for duplicates to
include spelling differences. If it finds a similar match in “product
name” and “store” I’d like it not to duplicate, but add it if it’s
different city or store (So you could add the same product, but show
pricing in different cities or different stores).
Name: Magnavox 42 inch
Name: Magnavox 42 in
I don’t want a duplicate record created since these match. Trying to
figure out what to do when product names can be abbreviated or store
names spelled differently (wal-mart/walmart/wal mart or h.e.b./heb) or
city names mispelled.
This sounded like a fuzzy search using something like Ferret, or a
“did you mean” spelling plugin such as:
http://www.ruby-forum.com/topic/104327 It also sounded like a
validation problem, but I didn’t find anything under
that fit. A combination of all three sounds like a bloated solution
that would degrade performance.
Am I on the right track or should I be looking into something else to
help me figure this out? Thanks.