Wondering How To Set Up Index Search?

In order to set up Index Search, follow the following steps:


Modification of alisearch

#!/usr/local/bin/perl
#
# aliwebsimple: Simple ALIWEB search
# Version 2.1
# Date: Mon Apr  4 14:35:34 BST 1994
#
# By Martijn Koster (m.koster@nexor.co.uk)
# This code is placed in the public domain.
#
# *** Modified Tue Apr 5 1994 by Robert Thau, rst@ai.mit.edu
# *** for CGI compatibility.
#
# 2.1: separated documents into variables, converted to HTML+
#      separate searching for clarity
#      searcher can now be un-evalled by commenting out lines

($0 =~ /(.*)\/(.*)_search/);
$indexfile = $2;
$indexfilename = "/usr/users/www/html/" . $indexfile . ".idx";
$dialogfilename = "/usr/users/www/html/search_lib/" .  $indexfile . "-dialog";
$resultfilename = "/usr/users/www/html/search_lib/" .  $indexfile . "-result";
	
  1. The first line, #!/usr/local/bin/perl should be matched with the path and name of your perl program.
  2. The paths in the 19th - 21st lines should be matched with that of each, respectively.
  3. Click for a dialog file and a result file example.

Modification of site-index.pl

#! /usr/local/bin/perl

# site-index.pl --- constructs IAFA templates for a Web site running
#                   NCSA httpd; puts them in DocumentRoot/site.idx
#
# version 0.2
#
# Copyright 1994 Robert S. Thau.  Unlimited distribution permitted so
# long as this notice is preserved.

# Configuration --- organization info.

$site_desc = 'Web server at the BYU Computer Science Department';
$site_keys = 'CS, Computer Science, BYU';

# Directory containing /conf and /logs subdirs; same as -d opt to httpd.
# This is NOT your DocumentRoot --- we get that out of srm.conf, just like
# the server does.

$server_dir = '/usr/users/www/www/httpd_1.1';  
	
  1. The first line, #!/usr/local/bin/perl should be matched with the path and name of your perl program.
  2. Change the contents of $site_desc and $site_keys for your need.
  3. Change $server_dir = '/usr/users/www/www/httpd_1.1'; to the path of your httpd.

Modification of update-index

#!/bin/ksh
perl /usr/users/www/html/site-index.pl
cat /usr/users/www/html/organization.IAFA.info >> /usr/users/www/html/site.idx
cat /usr/users/www/html/site.idx >> /usr/users/www/html/local.idx
  1. The first line, #!/bin/ksh is obvious. It should be matched with the path and name of your ksh program.
  2. Change the paths of the rest of lines accroding to your setup.

Rosina Bignall (bigna@lal.cs.byu.edu)