| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<title> |
| 5 |
Running ht://Dig |
| 6 |
</title> |
| 7 |
</head> |
| 8 |
<body bgcolor="#eef7ff"> |
| 9 |
<h1> |
| 10 |
Running ht://Dig |
| 11 |
</h1> |
| 12 |
<p> |
| 13 |
ht://Dig Copyright © 1995-2004 <a href="THANKS.html">The ht://Dig Group</a><br> |
| 14 |
Please see the file <a href="COPYING">COPYING</a> for |
| 15 |
license information. |
| 16 |
</p> |
| 17 |
<hr size="4" noshade> |
| 18 |
<p> |
| 19 |
This document will attempt to show the steps needed to use |
| 20 |
the ht://Dig system, after <a href="where.html">obtaining</a>, |
| 21 |
<a href="install.html">installing</a> and |
| 22 |
<a href="config.html">configuring</a> it.<br> |
| 23 |
The main sections are: |
| 24 |
</p> |
| 25 |
<ul> |
| 26 |
<li> |
| 27 |
<a href="#rundig">Building the databases</a> |
| 28 |
</li> |
| 29 |
<li> |
| 30 |
<a href="#testing">Testing and troubleshooting</a> |
| 31 |
</li> |
| 32 |
<li> |
| 33 |
<a href="#maintenance">Maintaining the system</a> |
| 34 |
</li> |
| 35 |
</ul> |
| 36 |
<hr noshade> |
| 37 |
<h2> |
| 38 |
<a name="rundig">Building the databases</a> |
| 39 |
</h2> |
| 40 |
<p> |
| 41 |
After setting up all the <a href="config.html">configuration |
| 42 |
files</a>, you can build the required databases simply by running |
| 43 |
<a href="rundig.html">rundig</a>. This script will run |
| 44 |
<a href="htdig.html">htdig</a> first to build the initial database, |
| 45 |
then it runs <a href="htpurge.html">htpurge</a> to clean up the |
| 46 |
document and word databases that were created by htdig. |
| 47 |
It then runs <a href="htnotify.html">htnotify</a>, and finally |
| 48 |
runs <a href="htfuzzy.html">htfuzzy</a> if necessary, to build |
| 49 |
the endings and synonyms databases if they're missing or outdated. |
| 50 |
The rundig script can be customized for your specific needs, or |
| 51 |
you can develop your own script that runs any of these programs. |
| 52 |
Read the reference sections for each of these programs to get a |
| 53 |
better understanding of what each one does. |
| 54 |
</p> |
| 55 |
<p> |
| 56 |
The <a href="htfuzzy.html">htfuzzy</a> program deserves a bit more |
| 57 |
explaining. It is used to build databases that are used by some |
| 58 |
of the fuzzy match algorithms selected by |
| 59 |
<a href="htsearch.html" target="_top">htsearch</a>'s |
| 60 |
<a href="attrs.html#search_algorithm">search_algorithm</a> |
| 61 |
attribute. The <em>endings</em> and <em>synonyms</em> algorithms |
| 62 |
use static dictionaries, so their databases only need to be rebuilt |
| 63 |
by htfuzzy when the dictionary files are changed, or when ht://Dig |
| 64 |
is initially installed. The rundig script handles the building of |
| 65 |
these two databases as needed for the default setup. A few of the |
| 66 |
other fuzzy match algorithms use databases that are derived from |
| 67 |
the word database built by htdig/htpurge, so if you use these |
| 68 |
algorithms you should rebuild their databases with htfuzzy every |
| 69 |
time you update your index. This isn't done in rundig, but the |
| 70 |
comments in the script show where you can add your htfuzzy commands |
| 71 |
as needed. Some fuzzy match algorithms don't need their own |
| 72 |
database, as they just operate on the word database, so they don't |
| 73 |
need any special setup. |
| 74 |
</p> |
| 75 |
<hr noshade> |
| 76 |
<h2> |
| 77 |
<a name="testing">Testing and troubleshooting</a> |
| 78 |
</h2> |
| 79 |
<p> |
| 80 |
Once the databases are built, you should test out htsearch. |
| 81 |
It's recommended that you first try a few queries running |
| 82 |
htsearch on the command line, as it helps to separate problems |
| 83 |
that are specific to ht://Dig from web server or CGI problems. |
| 84 |
Once you have that working, try running htsearch from your web |
| 85 |
browser, using the search form you configured. |
| 86 |
</p> |
| 87 |
<p> |
| 88 |
If you run into problems at any point in the building and testing |
| 89 |
of your databases, there are many things you can do. All ht://Dig |
| 90 |
programs feature a <strong>-v</strong> option to get some debugging |
| 91 |
output. The more of these options you put on the command line, the |
| 92 |
more output you'll usually get. To get help with common problems, |
| 93 |
or with interpreting some of the debugging output, please look to |
| 94 |
the ht://Dig <a href="FAQ.html">FAQ</a> (frequently asked questions) |
| 95 |
as your first line of support. Most of the problems that ht://Dig |
| 96 |
users have are explained there, and the on-line |
| 97 |
<a href="http://www.htdig.org/FAQ.html">FAQ on the website</a> is |
| 98 |
updated frequently as new problems arise. The FAQ will also tell |
| 99 |
you where you can turn if your question isn't answered there. |
| 100 |
Remember that questions may not be phrased exactly as you'd state |
| 101 |
them, so look carefully for anything that seems similar to the |
| 102 |
problem you're trying to solve. |
| 103 |
</p> |
| 104 |
<hr noshade> |
| 105 |
<h2> |
| 106 |
<a name="maintenance">Maintaining the system</a> |
| 107 |
</h2> |
| 108 |
<p> |
| 109 |
Once everything is running, you have to deal with the question of |
| 110 |
how you can keep everything running and up to date. The databases |
| 111 |
don't automatically update themselves, of course, so you'll need |
| 112 |
to figure out how to schedule automatic updates of the database. |
| 113 |
Most users use the <strong>crontab</strong> facility on their |
| 114 |
systems to schedule daily or weekly updates of their database. |
| 115 |
This can be as simple as running "rundig" or "rundig -a" from |
| 116 |
your crontab, or from a file in /etc/cron.daily if your system |
| 117 |
uses this, to rebuild from scratch every night. For a small site, |
| 118 |
this may take only a few minutes to run. Other sites will run |
| 119 |
more elaborate update scripts, to update their existing databases |
| 120 |
nightly, and schedule complete rebuilds less frequently, such as |
| 121 |
monthly. |
| 122 |
</p> |
| 123 |
<p> |
| 124 |
You need to pay close attention to how long updates take to run. |
| 125 |
There are no database lockouts in ht://Dig, so you don't want to |
| 126 |
schedule update or reindexing runs so frequently that they run |
| 127 |
into each other. |
| 128 |
</p> |
| 129 |
<hr size="4" noshade> |
| 130 |
|
| 131 |
Last modified: $Date: 2004/05/28 13:15:19 $ |
| 132 |
<br> |
| 133 |
<a href="http://sourceforge.net/"> |
| 134 |
SourceForge</a> |
| 135 |
|
| 136 |
</body> |
| 137 |
</html> |