[Haskell-cafe] Optimizing a title matcher
lists at qseep.net
Wed Sep 27 13:09:43 EDT 2006
Ketil Malde wrote:
> Do you really need that to search for movie titles? At any rate, an
> exact-match finite-map implementation is a good start - to get good
> performance, you probably will need to use some kind of index to
> reduce the amount of data to search exhaustively (all-against-all).
> For text searching I think it is effective to use an index that
> maps from words (so that looking up a word gives you all the movies
> with that word in the title).
Gotcha. That's exactly the approach I've switched to. It is possible to
miss titles, if words are misspelled, but it's unlikely that all words
in the title will be misspelled, so you can at least narrow your search
to titles that have at least one matching (non-trivial) word.
More information about the Haskell-Cafe