Welcome to the Monastery | |
PerlMonks |
Re^7: speeding up a file-based text search (word list for phrase search)by Aristotle (Chancellor) |
on May 09, 2003 at 19:04 UTC ( [id://256979]=note: print w/replies, xml ) | Need Help?? |
Depends on your word list. You could store the in-record location(s) of the word as well; then, when doing a phrase search, you can intersect the sets for each word by record and then check for consecutive locations in the correct order. This is, AFAIK and at least roughly, the way all of the big web search engines work.
Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|