[Sigia-l] the future of search
Listera
listera at rcn.com
Fri Jul 26 17:37:27 EDT 2002
> Itunes does this incredibly well with your MP3 collection...
The method behind the notion of search-while-you-type is quite simple. If
you have a programming environment with event handlers, then you probably
have something like onKeystroke and a method that returns what the user has
so far typed in the field in focus (or you can parse it yourself). Match
that against your data source and return the hits.
This becomes unmanageable when the datasource is potentially very large.
Apple, as has been pointed out, has this in iTunes, but in Jaguar (OSX 10.2
coming up next month) the search field now in every Finder window toolbar
requires Enter/Return to activate the search, since you don't want to be
searching through the entire network after every keystroke :-)
Initiating a search after every keystroke is doable if your user is typing
at, say, 1 character/minute ;-) or if you can cache the first tier of
potential returns. It sure helps if you spawn a separate process for each
search; separate keystroke-parsing, search and results display; and kill
threads as they become obsolete. While the approach may not work with
potentially very large datasources (like file systems or a terabyte DB),
with hierarchical or faceted structures, you can get very decent performance
if you can cache the top-level data: root-level folders, main nodes, topics,
etc.
This is very re-usable code, I've included it in pretty much all C/S or
standalone apps I developed over the past decade. It's a very easy
function/feature to charge extra for. I've never had a client that refused
it. Users love it, as it can be truly useful. If you integrate a bit of
logic in parsing the keystrokes and return results that are semi-complex
matches that would have otherwise taken several extra steps for the users to
achieve, I guarantee that they'll be saying, "Wow, how does it do that?"
People refer to this functionality under different names; the one I like is
'clairvoyant typing'. It's easier to sell it that way :-)
Best,
Ziya
More information about the Sigia-l
mailing list