I've been looking at different ways to implement an instant text search on my web application; at the moment it uses a very basic SQL LIKE query with wildcards.
I have looked at many ways to implement searches, but I never saw anyone suggest to do the following:
As the user types, when the query gets to 4 or 5 characters, perform the database search.
Display the results to the user, and as they continue typing, just use Javascript to filter the results, so no more database calls are required.
This way there would only ever be one database call per search, if the user makes a typo, they can backspace and Javascript would take care of displaying the correct results.
Are there any downsides to this method?