![]() ![]() |
![]() |
![]() |
Service CatalogService LevelsQuick Links
Web Services and Resources© 2009 The Regents of the University of California.
|
Index/search your web pages If your pages are all on the same machine (e.g. in one or more directories under AFS) on the ITS compute servers, you can use SWISH-E and the websearch interface. The two step process to generate a search page is explained below. 1. Index your pages with SWISH-ECreate the following file (feel free to copy the file to your locker, and modify it to suit your needs):
% chmod a+r myindex.conf % fs sa . wwwadmin.bombalurina read Once you've set up your myindex.conf file, type: % swish-e -c myindex.confto start indexing your pages (on Athena, you may also need to give the command add search to attach the search locker where the swish-e command is kept). This will create a file called myindex.swish which is typically 10-15% of the size of the material being indexed. You'll need to give this command whenever the contents of your pages change. 2. Set up your search page with websearchCreate the following file (feel free to copy the file to your locker, and modify its contents to suit your needs):
% chmod a+r myindex.rc % fs sa . wwwadmin.bombalurina read Now insert the following lines in the page where you want the search box to appear (change the USERNAME to your own):
<form method="POST" action="/search/cgi-bin/websearch.pl">
<input type=hidden name=conffile
value="/afs/cats/users/X/USERNAME/public_html/myindex.rc">
<p>
Enter keyword(s):<br>
<input type=text name="keywords" size=30>
<input type=submit value=" Search ">
</form>
Here are some additional sample forms to show you other ways to set up your own search pages.
|