Using lq-text with the World Wide Web


You can use lq-text to allow your web site to be searched.
You can also provide access to any lq-text database over the Web.

The steps are
[1] configure and install the lq-text software on the server machine
[2] configure and install the httpd Web Server software, if necessary.
    You will need to allow cgi-bin access, and you should also enable
    nph-scripts, if your server supports them, as give a much faster
    response without taking more system resources.
[3] use lqmkindex or lqaddfile (as you wish) to make an index to whatever
    files you want indexed.
[4] copy the programs from the cgi-bin subdirectory here into the cgi-bin
    directory on your Web server.  Make them executable (chmod +x filename).
[5] edit the programs that you copied as follows:
    change LQTEXTDIR to be the correct directory.
[6] test with the URL
	http//sparc36.barefoot.com/cgi-bin/lqtext
    where sparc36.barefoot.com is actually the name of the machine running
    your httpd web server software.

    This URL should now give you a simple search form.
    Enter a word that is likely to occur often in your database (and that
    is not in the CommonWords stoplist, if you used that feature), such
    as "the" or "html".

    You should get a results list.  Clicking on a result should show you
    the corresponding file.  If there were more than 75 hits, you should
    be able to move forward to the next 75 hits using the links at the
    top and bottom of the results list (next 75 documents...).

    If you don't get a results list, check the httpd/logs directory to
    see if there is an entry in the error long; the most common problems are
    not having the lq-text programs in httpd's $PATH, and not giving httpd
    read access to the lq-text database files.

[7] if that's OK, you can now add links to your simple search form.
    Simply put that URL on any page, e.g. as
    <A HREF="http//sparc36.barefoot.com/cgi-bin/lqtext">
	Search this web site...</A>

[8] The more complex search form is in the htdocs directory here, and
    you'll have to edit it to change the URL in the ACTION attribute on
    the FORM element.  (The form is called search.html)
    This form uses both the nph-lqtext CGI script and the nph-lqdeliver
    CGI script.  The first script makes the results list, and the second
    script delivers documents with individual matches marked.

    You will want to edit search.html as well as the nph script before
    using the complex search.  If you are not sure how to do this, start
    off with the simpler search form in step [6] until you're more
    confident.

    A good book about the Web is by Ian Graham.  Also see the documentation
    on WWW servers, e.g. at www.apache.org for the free Apache server,
    which is what I use.


