[an error occurred while processing this directive]
Keyword Indexes

The glimpse indexing system available to WebCom customers for implementing search facilities for their web sites is really designed primarily for searching the entire contents of large groups of files. How then, do you use Glimpse to search for keywords associated with files?

The answer is that since this is not the application for which Glimpse was designed, it is not quite as straightforward as simply using Glimpse to create a full-text index of a set of files.

However, you can use Glimpse to quite readily and powerfully simulate a keyword index (or any other type of specialized index) by creating a special file just for this purpose, and then creating a Glimpse index of that file alone.

In this special file, you create one line for each indexed resource. On the line, you list the keywords or other attributes of the file and an anchor (hotlink) to that file.

You then create a Glimpse index of that file alone and search that Glimpse index with the "show lines" option in which Glimpse outputs each matching line. Then, when you perform a Glimpse search of that file, only lines containing the keyword being searched for (the matching lines) are displayed. However, since you've cleverly included an anchor to the file in question on each line of the indexed file, when the matching line is displayed, so your link to the file in question!

Here is a sample web page, the only purpose of which is to be indexed by Glimpse for a keyword search:

<HTML>
<HEAD>
<TITLE>Famous ArtworFamous Artwork</TITLE>
<META name="description" content="The following items match your keyword search:">
<META name="distribution" content="local">
</HEAD>
<BODY>
<!--art,visual,painting,women,nude,bathers,Cezanne,Impressionism--><A HREF="http://webcom.com/~webcom/myacct/bathers.gif">Cezanne's Nude Bathers</A>
<!--art,visual,Ansel,Adams,photography,Yosemite,El Capitan--><A HREF="http://webcom.com/~webcom/myacct/elcapitan.gif">Ansle Adams Photo of El Capitan</A>
<!--art,music,romantic,Vivaldi,spring,four,seasons--><A HREF="http://webcom.com/~webcom/myacct/vivaldi.wav">Vivaldi's Four Season's (Spring Movement)</A>
</HTML>

If you were to create a Glimpse index of just this file, and in the Glimpse search specify that all matching lines be displayed, then a Glimpse search of the above file would output each of the lines with matching keyword(s). Since we've put the actual keywords themselves inside the HTML comment brackets (<!--comment-->), the user does not actually see the keywords when the line is output. In fact, only the hotlink to the qualifying document is visible. Voila!

Note that this system is not perfect; it is a rough approximation of true keyword indexing. Here's some examples of where this system is not ideal:

In spite of these minor failings, this is an effective method of simulating a keyword index using the Glimpse mechanism.

You should always create a "medium" sized Glimpse index of the a keyword file. In a medium sized index, Glimpse maintains not only the cross-index of the words in the file, but the precise location in the file of each word, so rather than searching the whole file for matching lines after determining from a Glimpse index that the word does indeed exist in the file, Glimpse can fetch each matching line directly. This will improve the performance of your search. Since this keyword file is relatively small (compared to the amount of information indexed by the file), the actual Glimpse index of the file is very small indeed, even though you chose a "medium" Glimpse index, which is the largest type of Glimpse index.

If this process of creating a full-text index seems a bit convoluted, it is because Glimpse is not really designed for keyword indexes; it just so happens that you can make it work for that purpose by using a few clever little tricks. For many WWW site developers, a full text index of all their web pages will be a perfectly adequate and powerful search mechanism for indexing their pages comprehensively in one fell swoop, and since this is the application which Glimpse was designed for, it is a bit simpler.

However, those who want to create more specialized indexes can use the technique described above.

[an error occurred while processing this directive]