-->
Previous | Table of Contents | Next |
A number of directories are included in the distribution software, most of which are of obvious intent (bin for binaries, man for man pages, and so on). The directories used by freeWAIS in its default configuration are as follows:
bin | Binaries | |
config.c | C source code for configuration | |
doc | Doc files, help files, and FAQs | |
include | Header files used by the compiler | |
lib | Library files | |
man | Man pages | |
Src | freeWAIS source code | |
Wais-Sources | Directory of Internet servers | |
Wais-Test | Sample indexer and service scripts |
Once you have fine-tuned the configuration file information, you can compile the freeWAIS source with the make command:
make linux
By default, the make utility compiles two clients called swais and waisq. If you want to compile an X version of WAIS called xwais (useful if you want to allow access from X terminals or consoles), uncomment the line in the Makefile that ends with makex.
When you have the compiled freeWAIS components installed and configured properly, you can begin setting up the WAIS index files to documents available on your system. This is usually done by creating an index directory with the default name of wsindex. The directory usually resides just under the root of the file system (/wsindex) but many administrators like to keep it in a reserved area for the WAIS software (such as /usr/wais/wsindex). If the index files are difficult to locate, users may have problems when they try to find them.
The wais-test directory created when you installed freeWAIS contains a script called test.waisindex that creates four WAIS index files automatically for you. These are used to test the WAIS installation for proper functionality, as well as to show you how you can use the different search and index capabilities of freeWAIS. The following are the four index files:
test-BOOL | Index of three example documents using the Boolean capabilities and synonyms | |
test-Comp | Index demonstrating compressed source file handling | |
test-Docs | Index of files in the doc directory showing recursive directory search | |
test-Multi | Index of GIF images and multidocument capabilities |
After graphically based (usually X-based) browsers can handle the Multi document formats, although any type of browser should be able to handle the other three index formats.
After you have verified that the indexing system works properly and all the components of freeWAIS are properly installed, you need to build an index file for the documents available on your system. Do this with the waisindex command. The waisindex command enables you to index files two ways using the -t option, followed by one of these keywords:
one_line | Index each line of a document so a match can show the exact line the match occurred in. | |
text | Index so a match shows the entire document with no indication of the exact line the match occurred in. This is the default option. |
The waisindex command takes arguments for the name of the destination index file (-d followed by the filename), and the directory or files to be indexed. For example, to index a directory called /usr/sales/sales_lit into a destination index file called sales, using the one_line indexing approach, you would issue the command:
waisindex -d sales -t one_line /usr/sales/sales_lit
Because there is no path provided for the sales index file in this example, it would be stored in the current directory.
After your WAIS server is running (see the section entitled Starting freeWAIS), you can test the indexes by using the waissearch command. For example, to look for the word WAIS in the index files, issue the command:
waissearch -p 210 -d index_file WAIS
Where -p gives the port number (default value is 210), and -d is the path to the index file. If the search is successful (and you have something that matches) you will see messages about the number of records returned and the scores of each match. If you see error messages or nothing, check the configuration information and the index files.
Previous | Table of Contents | Next |