I am thinking of implementing a string search similar to the command-t search in VIM. The context is almost the same: Finding Files in a Webapp.
It's not easy to explain how the command-t search works in a nutshell, so I try to give an example:
The following string:
matches in that way:
This only makes sense in combination with a live autocomplete search, so it has to be really fast :).
Of course, the most naive approach is to use wildcards and build a search term like this:
"%d%p%a%n%y%s%t%a%d%o%e%" but we all know this is a bad idea as long as the data to query grows.
Any ideas how to start? Are there better ways to prepare the data? Which indexes could help?