in reply to Re: (dws)Re: Search Engines for Dummies
in thread Search Engines for Dummies

You could have the indexer remember the starting position of each letter in the alphabet, and emit a separate require-ready file of these positions. That would indeed cut the search down. Or you could sort the index by word length, and remember those starting positions.

Note that in either case, you're building an index, and have set one foot on the slippery slope towards a using DBM or SQL. Why not go all the way?

  • Comment on Re: Re: (dws)Re: Search Engines for Dummies

Replies are listed 'Best First'.
Re: Re: Re: (dws)Re: Search Engines for Dummies
by Danilo (Novice) on Feb 27, 2001 at 01:07 UTC
    I think that I would try using the a db just for the exercise, but I was going under the impression that the size of his file was small enough that implementing a db would have more overhead, and might not be worth the effort to learn a db module.