#!/bin/sh perl=/u/excite/architext/perl eval "exec $perl -x $0 $*" #!perl $root = "/u/excite/architext"; unshift(@INC, "$root/perllib"); require 'architext_query.pl'; $aurl = "/cgi-docs/"; $db = "oralchVibrant_Life"; $index = "/u/web/oralch/collection/oralchVibrant_Life"; $hroot = "/u/web/"; $binary = "/u/excite/architext/architextSearch"; $urledit = 's|^\/u\/web\/oralch\/||'; print "Content-type: text/html\n\n"; print "Excite for Web Servers Search Results\n"; print "

\n"; ## Read the arguments to the form %form = &ArchitextQuery'readFormArgs; $search = &ArchitextQuery'setSearchString(%form); $searchtype = &ArchitextQuery'getSearchMode(%form); ## put necessary additional information into %form $form{'aurl'} = $aurl; $form{'db'} = $db; $form{'index'} = $index; $form{'hroot'} = $hroot; $form{'binary'} = $binary; $form{'root'} = $root; $form{'urledit'} = $urledit; $form{'searchpage'} = $ENV{'HTTP_REFERER'} if ($form{'sp'}); $form{'docs'} = '1' unless $form{'docs'}; $form{'psearch'} = $form{'psearch'} || $form{'search'}; $form{'search'} = $search; $errstr = 'success'; ## This call checks to make sure that an index has been built for ## this collection. &ArchitextQuery'checkForIndex(%form); if ($searchtype eq 'confidence') { ## Perform the query. This function doesn't print anything. ##Later commands will display the results. ($errstr, @query_results) = &ArchitextQuery'MakeQuery(%form); $docs = &ArchitextQuery'PrepareGather(*query_results); $form{'docs'} = $docs; &ArchitextQuery'showSearchMode($searchtype, %form) unless (($errstr eq 'summary') || ($errstr eq 'dump')); &ArchitextQuery'showSearchString(%form) unless (($errstr eq 'summary') || ($errstr eq 'dump')); &ArchitextQuery'HtmlList(*query_results, %form) if ($errstr eq 'success'); } else { ## subject group query &ArchitextQuery'showSearchMode($searchtype, %form); &ArchitextQuery'showSearchString(%form, 'gather', 'gather'); $errstr = &ArchitextQuery'MakeGather(%form); } if ($errstr eq 'summary') { &ArchitextQuery'SummaryOutput(*query_results); } elsif ($errstr eq 'dump') { &ArchitextQuery'DocumentOutput(*query_results); } else { print &ArchitextQuery'queryError($errstr) unless ($errstr eq 'success'); } &ArchitextQuery'footer($aurl) if ($errstr eq 'success'); print "\n";