Syntactic Confectionery Delight | |
PerlMonks |
Re: Form validation/Search scriptby wfsp (Abbot) |
on Oct 24, 2005 at 19:47 UTC ( [id://502570]=note: print w/replies, xml ) | Need Help?? |
Hi No-Lifer! One way to go about this is to first build a list of keywords and then all you need do is a lookup. You could use HTML::TokeParser to extract the text from each page and something like this to extract the words (what are your plans for common words, accents, hypens, numbers etc.?). Then load the words into a DB (I use DBM::Deep) with a reference to each file that contains each word (I use another D::D for the file refs). All you have to bear in mind is to apply the same rules to the words submitted as you did when you built the index. Then perhaps HTML::Template to format the results and CGI::Session to display them a page at a time. At the moment I build the index locally and upload it. There are about 2k pages and the index comes in at a shade under 42k words (12MB). And, fingers crossed, it's working well. I would be interested in seeing an outline of how you plan to go about this. We may be able to make some suggestions before you commit yourself to any particular strategy. Good luck!
After writing this I saw your reply to Limbic~Region. My advice above still stands.
In Section
Seekers of Perl Wisdom
|
|