I have a list of persons that I want to search for while filtering. Each time the user enters a search string, the filtering is applied.
There are two challenges to consider:
- The user may enter part of names
- The user may mistyping
The first one is simply resolved by searching for substrings e.g. String.Contains(). The second one could be resolved by using a Fuzzy Implementation (e.g. https://fuzzystring.codeplex.com)
But I don't know how to master both challenges simultaneously.
For example: I want to find the person "Dr. Martin Fowler" when entering one of:
- "Martin"
- "Fawler"
- "Marten Fauler"
I guess I need to write a "FuzzyContains()" logic, that handle my needs and also has an acceptable performance. Any advices how to start?