I would recommend Lucy. It comes with a lot of what you want out of the box and has the speed to pile on all the correlated queries you want if you build the data for it to use. For misspellings you’ll need to either apply Text::Aspell (tunable misspelling) or Text::DoubleMetaphone (major misspelling) or similar. Synonyms… not sure, I’ve never done it. If you have a specific domain, there might be prior art, like the UMLS::Similarity stuff for medical knowledge. Not sure about generic thesaurus stuff. Let us know if you figure that piece out.

This stuff is typical but not easy. When you put so much in the mix then ostensibly simple things like sorting can get difficult. This kind of search also works best with either static or slowing slowly changing search bodies. Search here is fast at the expense of indexing the data up front.

Update: recent example—Re^3: Using indexing for faster lookup in large file.


In reply to Re: Caught in a Search Recursion ;-) by Your Mother
in thread Caught in a Search Recursion ;-) by DougMcq

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.