Hey,
I am working on exactly what you are looking for (i am planning to eventually make it open source).

Note that my approach is probebly overkill in your situation, it is meant for large data sets (tested on 250MB of text & works surprisingly well).
I found that the best way is to set up an inverted-index of all the terms as well as an index which shows the position of each word within each document.
I then use an algorithm which gives a bonus if the words that are being searched appear close to each other in a ducument -- this proximity-search algorithm is described at http://citeseer.nj.nec.com/cachedpage/550719/1 .
Also to improve the inverted-index words are indexed by their stem (a stemming algorithm can be found here http://www.ldc.usb.ve/~vdaniel/porter.pm ).
Aswell I have implemented an algorithm similar to google's pagerank (a good description of it is at http://citeseer.nj.nec.com/cachedpage/368196/1 ), the popularity of a page is taken into account when returning results.

I use MySQL for all the storage / indexes.


In reply to Re: make a web site searchable by Anonymous Monk
in thread make a web site searchable by bear0053

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.