I know i talked about use of Ternary Search Tree TST earlier and TST is probably more efficient but i couldn’t the most comprehensive TST implementation could only return user specific matches based on length.
if you entered hi, it would return hi
if you entered hi*, you will get his, him etc.
if you entered hi**, you will get high, hind etc.
TST however had a simple contains for preliminary match.
This meant that i will need to run it multiple number of times to get overall matches and then sort it based on relevance. Too many calls equals eventually slower plus knowing keeping constant tab max word length and keep padding wildcards.
so I have settled on Trie, which allows individual char entries and provides option to see if its a full match (similar to contains) and gives you all matches in a single list. Sorting takes care of relevance and it works perfectly.
Thank goodness… One user complained about match list being a bit iffy, i am going to make each item have larger area which would allow more touch area !!!