Yesterday I decided to "graduate" my application's home-grown search mechanism (which worked quite well, mind you, but in a limited way since it required a SQL database to work, and wouldn't do fuzzy searches) to something more "institutional". Searching around in the CPAN-space, I found Plucene and Kinosearch, both Perlized versions of Lucene. Since I had more awareness of Plucene, and since its version number is higher than Kino ;-), I decided to give it a whirl.

Likely I am being dense, but I found Plucene's documentation very sparse. In fact, in the beginning I didn't have any idea of even the first steps. There was a suggestion in the docs to read a couple of "onjava" articles on Lucene given that Plucene mirrored Lucene so well. I read those articles, but since I understand zip about Java, that didn't get me anywhere.

Then I found Plucene::Simple. That got my first steps going, but I was stuck again. Then I found a circa 2004 article by Simon Cozens on perl.com which actually gave step-by-step instructions on how to implement a web-based search. That was nice, but surprising that it took so much digging around.

The article referenced above required downloading other modules (Text::Context and family, among others) in order to make the search results nicer looking. After all this, I still don't know how to do several other things that my home-grown solution had such as calculating and ordering by relevance scores.

I have some experience with implementing Swish-e and have found that to be relatively easier than my experience with Plucene above. There is also ht:dig... maybe other mechanisms as well.

  1. What do other monks implement for searching?
  2. How do Plucene and Kinosearch compare?
  3. What is their relative longevity?
  4. Is there a canonical "Perl way" of searching through websites?
--

when small people start casting long shadows, it is time to go to bed

In reply to looking for a good Perl-way for implementing website search by punkish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.