How to detect a typo in a product search and suggest possible corrections?

后端 未结 3 1248
后悔当初
后悔当初 2021-02-02 03:34

Given a very large database of product names, how would you detect possible typos in user searches and suggest possible corrections (Kinda like the way Google presents them)?

3条回答
  •  爱一瞬间的悲伤
    2021-02-02 04:09

    I'm sure I read that google keeps a list of what a user retypes when they get no results. You could keep a mapping of these values (say if the retyped string begins with the same letter).

提交回复
热议问题