Do you have alot of perl docs which you have saved, and would like to search thru them, with nice "results pages" full of clickable links? Here is a good solution.

Get the monkey http daemon -> monkey It's a lightweight httpd daemon that runs cgi on any port you want. It defaults to 2001. Set it up in your home dir to use /home/yourusername as it's root. I installed it to /home/user/monkey

Then install Perlfect ->Perlfect Install it to the monkey cgi-bin. It has a setup script which works perfectly, just answer the questions. A tip: Don't run the indexer during the perlfect install, as it will index your whole homedir, and take forever. What you want to do is go into ~/monkey/cgi-bin/perlfect/search/conf/no_index.txt and edit it. What I did was dump all the directories in my homedir to no_index.txt with ls, then REMOVE the directories which you want indexed. Then run the indexer.pl script.

Now you just need to copy the search.html from the templates directory, to your /home/user/search.html and edit it's link to point to search.pl.

Start the monkey httpd daemon and point your browser to "http://127.0.0.1:2001/search.html and search all your saved files.

I wish O'reilly had used this search script on their Perl CD Bookset, instead of that crappy java search engine, which won't work with mozilla.

  • Comment on Searching locally with Perlfect with Monkey Httpd

Replies are listed 'Best First'.
Re: Searching locally with Perlfect with Monkey Httpd
by Anonymous Monk on Mar 11, 2003 at 17:27 UTC

    I'm curious, does anyone actually look at the source of Perlfect search before recommending it? It's a freakin mess! Just because it has a nice name and fancy site doesn't mean it's good software!

      Yes, but it works.

      Which superior program would you recommend in its place?

      At work we use it to index over 100,000 documents, which it handles fairly well, even though the manual specifically states not to index more than 2^16. Not too shabby.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.

      *sigh* Yes, I agree. I created a customized version of Perlfect search for a client (adding PDF indexing, searching for content in different languages and parts of the website, and a couple other things) and the code is not nice to work with, to say the least.

      And the worst thing is, working with awful code inspires you to write awful code yourself ;-)

      Still, I have to admit it does work nicely.

      <ramble>I've long been thinking of creating a modularized pure-perl search engine: Just choose some input modules (local fs, spider, ftp-spider, ...), preprocessors (PDF->text, summarizers, ...) and storage modules (MySQL, dbm, ...) and voilą: your customized search engine is ready. I doubt I will ever have the time, though...</ramble>