797 801




Linux Unleashed, Third Edition:Configuring a WAIS Site





-->















Previous
Table of Contents
Next




Chapter 49Configuring a WAIS Site

by Tim Parker

In This Chapter
•   Compiling and installing freeWAIS
•   Setting up freeWAIS
•   Starting freeWAIS
•   Building your WAIS indexes

WAIS (Wide Area Information Service) is a menu-based tool that enables users to search for keywords in a database of documents available on your system. WAIS was developed by Thinking Machines but spun off to a separate company called WAIS Incorporated when it became immensely popular. A free version of WAIS was made available to the Clearinghouse for Networking Information Discovery and Retrieval (CNIDR) as freeWAIS, which is the version most often found on Linux systems.

WAIS lets a user enter some keywords or phrases and searches a database for those terms. A typical WAIS search screen is shown in Figure 49.1. (This screen is from the primary WAIS server at http://www.wais.com. This server is a good place to look for examples of how WAIS can be used.) In this example, we searched for the keywords “hubble” and “magnitude” (WAIS usually ignores case). After searching all the database indexes it knows about, WAIS shows its results, as shown in Figure 49.2.

Figure 49.1.  You can enter complex or simple search criteria on a WAIS search line.

Figure 49.2.  WAIS displays the search results with a score.
The display generated by WAIS, often displayed in a WWW browser or a WAIS browser as in these figures, lists each match along with its score from 0 to 1,000, indicating the manner in which the keywords match the index (the higher numbers are better matches). Users can then refine the list, expand it, or examine documents listed. In Figure 49.3, one of the documents listed in the search results is displayed in the WWW browser window. WAIS can handle many file formats, including text and documents, audio, JPEG and GIF files, and binaries.


Figure 49.3.  Selecting any entry on the WAIS search results lets you see the file.
The version of WAIS used commonly with Linux is called freeWAIS. This chapter looks at how you can set up a freeWAIS server on your Linux machine. WAIS is a useful service to provide if you deal with a considerable amount of information that you want to make generally available. This could be product information, details about a hobby, or practically any other type of data. All you have to want to do is make it available to others, either on your local area network or to the Internet as a whole.

The freeWAIS package has three parts to it: an indexer, a WAIS server, and a client. The indexer handles database information and generates an index that contains key words and a table indicating the word’s occurrences. The server component does the matching between a user’s requests and the indexed files. The client is the user’s vehicle to access WAIS and is usually a WAIS or WWW browser. WWW browsers usually have an advantage over WAIS browsers in that the latter cannot display HTML documents.
A follow-up backwards-compatible WAIS system is currently available in a beta version called ZDIST. ZDIST’s behavior is much like that of freeWAIS, with any changes noted in the documentation. ZDIST adds some new features and is a little smaller and faster than freeWAIS. Because of the unstable beta nature of ZDIST, we’ll concentrate on freeWAIS.
Compiling and Installing freeWAIS
The freeWAIS software is often included in a complete Linux distribution CD-ROM but is also readily available from many FTP and BBS sites. Alternatively, it can be obtained by anonymous FTP from the CNIDR site as ftp.cnidr.org. The freeWAIS system resides in the directory /pub/NDIR.tools/freewais/freeWAIS-X.X.tar.Z where X.X is the latest version number. The CNIDR site has many binaries available for different machines, as well as generic source code which can be tailored to many different systems.
One of the files in the distribution software, which should be placed in the destination directory, is the Makefile used to create the program. If you are compiling the freeWAIS source yourself, examine the Makefile to ensure the variables are set correctly. Most are fine by default, pointing to standard Linux utilities. The following are some of the exceptions that you may have to tweak:


• CC
The name of the C compiler you use (usually cc or gcc).


• CURSELIB
Set to the current version of the curses library on your system.


• TOP
The full path to the freeWAIS source directory.

The CFLAGS options lets you specify compiler flags when the freeWAIS source is compiled. Many options are supported, all explained in the documentation files that accompany the source. Most of the flag settings can be left as their default values in Linux systems. A few of the specific flags you may want to alter are worth mentioning, though. The most useful are the indexer flags, two of which are potentially useful:


• -DBIO
Used to allow indexing on biological symbols and terms. Use only if your site deals with biological documents.


• -DBOOLEANS
Enables you to use Booleans as AND and NOT. This flag can be handy for extending the power of searches.

The -DBOOLEANS flag handles logical searches. For example, if you are looking for the keywords “green leaf,” WAIS by default searches for the words green and leaf separately and judges matches on the two words independently. With the -DBOOLEANS flag set, the two words can be ANDed together so a match has to be with the two-word term “green leaf.”
A couple of other flags that may be useful for freeWAIS sites deal with the behavior of the system as a whole:


• -DBIGINDEX
Should be set when there are many (thousands) of documents to index.


• -DLITERAL
Allows a literal search for a string, as opposed to using partial hits on the string’s component words.


• -DPARTIALWORD
Allows searches with asterisks as wildcards (such as auto*).


• -DRELEVANCE_FEEDBACK
Set to ON, enables clients to use previous search results as search criteria for a new search. This is a useful option.





Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
Nokia BH 801 PL Manual
79704
79703
79701
797 (2)
Bunt i ofiara przejaw szaleństwa czy wrażliwości Twój ~801
79710
79702
79719
79721

więcej podobnych podstron