Currently i am trying to create a search feature for my website that will allow users to search for other users using their full name (first or last) or their username. Right now i have created a temporary search that uses mysql's LIKE
feature and %name% to allow for wild cards. Its very simple. What I'm having trouble with is trying to search for names when a full name is provided and only a shortened version of the name is in the database. For instance:
Searching Richard will only come up with Richards and not Richs. I'm really stumped as to how to create something that will do this without it being very inefficient. I was going to use SOUNDEX but that would only be useful for english names and words.
Also I wanted to ask if its a better idea to use a search engine like Apaches Lucene to index the databases? I was contemplating this but wasn't sure if it would be worth it since the search engine would only be searching for small full text strings.
Thank you