Searching a new string - adding a string to the set - would require comparing against all items in the set, yes. That's a much less daunting prospect than what you said: You really have to scan your complete dataset on every search.
Building the index, or adding to it, is not fast (without some heuristics applied) but searching using the index isn't bad.
I thought the thing peff briefly described above sounded pretty good. The worst case complexity, if I'm visualizing it right, would be the length of the string you were comparing.
I remember some discussion of this in previous HN threads but I don't know what it was about...
Building the index, or adding to it, is not fast (without some heuristics applied) but searching using the index isn't bad.