How to correct the user input (Kind of google “did you mean?”)

后端 未结 8 1314
粉色の甜心
粉色の甜心 2021-01-30 23:50

I have the following requirement: -

I have many (say 1 million) values (names). The user will type a search string.

I don\'t expect the user to spell the names c

8条回答
  •  渐次进展
    2021-01-31 00:19

    The Soundex algorithm may help you out with this.

    http://en.wikipedia.org/wiki/Soundex

    You could pre-generate the soundex values for each name and store it in the database, then index that to avoid having to scan the table.

提交回复
热议问题