Topic: Autocomplete search algorithm
Hi, I'm looking for the best search algorithm for autocomplete.
I am weak at SQL and I'm hoping someone will give a hand.
I need autocomplete to suggest best matches for artists.
Thedatabase may look like this:
Searching for "cor" I would expect it to find "The corporation", "Corporate Kidz"
Searching for "the cor" It should find "The corporation", "Corporate Kidz" and "Corpse,The"
with preference to the ones containing "the"
Also If I start typing "smi" it should display "John Smith" and "Smithers Burger" and James Alsmit with preference given to the ones beginning with "Smi"
I have constructing various MySQL queries but none seem to get it right.
I would expect an algorithm like this to be almost standard on my SQL search queries.