Development question about type-ahead search style

This is an idle question, just because I wnt to know if anyone else has managed it before I start putting a lot of time into it.

I’m developing a little utility in my sparetime. Each of the documents has a text field on it which contains all of the keywords for that item. These are not chosen from a list, but are automagically taken from various pieces of information on the form, and can be added to ad hoc by the user.

What I would like to be able to achieve is a ‘real time’ search bar, where the user types in something and the view is filtered against it as it changes.

An example might be easier.

User types N, and gets only the documents containing a keyword that begins with N, on the fly

Users types NO and gets only the documents containing a keyword that begins with NO, on the fly

Users types NOT and gets only the documents containing a keyword that begins with NOT, on the fly

.

.

Users types NOTES and gets only the documents containing a keyword that begins with NOTES, on the fly

Now, user types a space. No change from the above document disply.

Users types NOTES A and gets only the documents containing a keyword that begins with NOTES and a keyword that begins with A

Users types NOTES AD and gets only the documents containing a keyword that begins with NOTES and a keyword that begins with AD

etc etc

It’s kind of a real time view filtering - I don’t even know if it’s possible.

Anybody got any suggestions?

Stephen Lister