makedb - generate, update or remove wais databases
makedb [[-clean] -tidy] [-update] [-config config_file] [-test] [-debug] [-verbose] [-copy tmpdir] ([-all] | database ...)
makedb creates, updates or removes databases specified in a makedb config file (./makedb.conf unless overwritten by the -config option).
Note that all options may be abreviated with a uniquely identifying prefix.
Delete databases. This option can be used together with the -update option. Deletion is done before the update regardless of the order ogf options on the command line :-). Files with extension src, fmt, fde, syn, stop, and cat will not be removed unless -tidy is given too.
src
fmt
fde
syn
stop
cat
Read an alternate config file. Default is ./makedb.conf.
Update the databases.
Do clean/update all databases specified in the config file. If not given clean/update all databases specified on the command line.
Do nothing. Just print actions.
Do the actual indexing in tmpdir. Copy the database to tmpdir, run the index commands and copy the result back.
Not implemented yet.
Additional messages to stderr.
The config file should be made up of lines assigning values to variables as in:
waisindex = /usr/local/ls6/wais/bin/waisindex
Each assignment must start in column 1. Shell comments are allowed. Some of the variables have predefined meaning. There are global and local variables. Local variables are instantiated for each database. Each database = assignment introduces a new local block. Use the -verbose option if you are unsure about the scoping. Assignments may have the form variable += value in which case the value is appended to variable.
database =
+=
The following variables are global. The last occurance in the file counts.
Path to the waisindex program. See example above.
Options for all waisindex runs. For example:
wais_opt = -nocat
Directory where to look for database.fmt if it does not exist in dbdir. Also database.src, database.fde, database.syn, database.stop and database.cat are copied unless they exist in dbdir.
.fmt
.src
.fde
.syn
.stop
.cat
The following variables are local to a database block. The last occurance up to the end of the block counts. For limit, dbdir and options there can be global defaults (given before the current block). When leaving a block these values are restored.
The name of the database.
A list of shell fileglob expressions as in:
files = /usr/local/doc/*.html files += /usr/local/doc/*.doc
You may also use backticks (`) but no double quotes ("):
`
"
files = `find $dbdir -name make\* -print`
Additional wasindex options. For example
options = -t fields
The directory in which the wais database lives.
The number of dead files which should be tolerated in the index. A dead file is a file which was in the index, changed and then re-indexed. Since the index does not provide deletions, the file is removed from the filename table instead. All postings remain in the index thus occupying space on the disc and slowing down the search. Also the global occurence counter for terms in the file have too high values thus twisting final weights for hits. When more than limit files are killed this way, makedb regenerates the whole index. This will take more time than simply updating but the index size is reduced and searches will be faster. So set limit to make your tradeoff. limit defaults to 100.
All other variables do not have any meaning to makedb unless you use them in the value part of an assignment as in:
docdir = /home/robots/wais/wais-docs database = test files = $docdir/TEST
# makedb.conf -- makdb configuration file # Global options dbdir = /home/robots/wais/wais-sources waisindex = /usr/local/ls6/wais/bin/waisindex wais_opt = -nocat # don't create catalog files limit = 10 # 10 dead files maximum # User defined variables docdir = /home/robots/wais/wais-docs # the databases database = bibdb-html files = $docdir/bibdb.html # use of variables in the value limit = 0 # no dead files options = -T HTML -t fields database = journals files = $docdir/journals/* limit = 3 options = -t fields database = www-pages wwwroot = /home/robots/www/pages # new global variable files = `find $wwwroot -name \*.html -print` options = -t URL $wwwroot http: database = test dbdir = /home/crew/pfeifer/tmp/wittenberg files = $dbdir/ma* files += $dbdir/te* # append options = -t text
Ulrich Pfeifer <pfeifer@ls6.informatik.uni-dortmund.de>
To install Wais, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wais
CPAN shell
perl -MCPAN -e shell install Wais
For more information on module installation, please visit the detailed CPAN module installation guide.