$! 'f$verify(0) $! VMSIndex.COM $! $! VMSIndex.COM - for DTquery searches with DECthreads server $! ============= $! 31-DEC-1994 F.Macrides (macrides@sci.wfeb.edu) $! Example htbin script interface to the $! VMSIndex search engine (DTquery.c) for $! use with the OSU DECthreads httpd. $! Should be placed where your htbin $! scripts have been mapped. $! 17-JAN-1995 Added example of using create for output. - FM $! $! DTquery.c is my modification of Bruce Tanner's query.c (for the $! VMS gopherd) and my WWWquery.c (for the CERN httpd) for accessing $! foo.doc;*, foo.IDX;*, foo.SEL;* filesets. The doc file(s) is(are) $! indexed with BUILD_INDEX.EXE, yielding the IDX and SEL filesets. $! This search engine was develeped by Bruce and colleagues associated $! with the VMSGopher-L@trln.lib.unc.edu list for use with the $! VMSGopherServer. It is similar to WAIS, but uses native indexing $! facilities of the VMS Record Management System (RMS). $! $! Build BUILD_INDEX.EXE (and WWWquery.EXE and QUERY.EXE for the CERN $! and Gopher Servers), by executing MAKE.COM. It will check out your $! system and then use MMS or command files, and the appropriate foo.OPT $! files. Read the header of Make_DTquery.COM and then build that for $! the OSU DECthreads Server. $! $! Read BUILD_INDEX.DOC for information about the indexer. The IDX and $! SEL files built by the indexer are the same whether they're intended $! for use by the Gopher or HTTP Servers, or from the DCL command line. $! $! An example HTML anchor and an example gopher tuple for invoking this $! script are included in BUILD_INDEX.DOC. $! $! This example script is for use with an index of all HTML documents $! (i.e., which have extension .html) in your WWW_Root:[000000...] $! data tree. The index should have been created with the example $! HTTP_INDEXTREE.COM in this distribution, and reside in the $! WWW_Root:[Index] subdirectory. If instead of one, "whole tree" $! index, you built a series of indexes for components of your data $! tree, you could call DTquery with a wildcarded index spec to search $! them all, or particular combinations which match the wildcarding. $! $! If no query was included in the client's request, a "database cover $! page" is returned. Modify that section, below, to indicate yourself $! and your host as the "database maintainer". The cover page assumes $! that the searchwords.html HELP file resides in a directory that is $! mapped to /www/ (change that if it's elsewhere). $! $! The symbol WWW_SEND_RAW_FILE must be made non-NULL (we set it equal $! to "TRUE", below, but any string will do, e.g., "YES"), so that $! DTquery will not add html "packaging", as the .html file should $! already have a
section withtag to be omitted by DTquery, but not the other html $! "packaging". You want it all omitted, since you presumably $! indexed sets of complete, normally independent foo.html files. $! $! The symbol WWW_SHOW_FILETYPE can be made non-NULL (e.g., "YES") to $! have icons (or ALT text) indicating the file types to be inserted $! into the hit lists returned from searches. $! $! If the symbol WWW_MAXIMUM_HITS is made non-NULL (i.e., set equal to $! a number), then the hit lists returned by searches will be abridged, $! if necessary, so as not to exceed that number. $! $! The symbol WWW_SHOW_SIZE can be made non-NULL (e.g., "YES") to have $! the size of each file or database section indicated in the hit lists. $! $! The symbol WWW_SHOW_DATE can be made non-NULL to have the date of the $! database indicated in the hit lists (DD-MMM-YY). If WWW_SHOW_TIME $! also is made non-NULL, for the current year the hour and minute will $! be indicated instead of the year (DD-MMM HH:MM). If WWW_USE_MDATE is $! made non-NULL, the date of the last modification (e.g., from an $! APPEND) will be used. The default is the file creation date (i.e., $! of the highest version). $! $! Verify the foreign command definition for DTquery, below. $! $!---------------------------------------------------------------------------- $ DTquery := "$WWW_Root:[BIN]DTquery" $!----------------------------------- $ database = "WWW_Root:[Index]VMSindex" $!----------------------------------- $ say = "write net_link" $ say "" ! Get the query string, if present. $ read net_link query $! $ IF query .eqs. "" $ THEN $! $! No query string. Send the Cover Page. $! $ say " " ! Construct the access symbol. $ read net_link id $ host = f$edit(f$element(1," ", id),"LOWERCASE") $ port = ":" + f$element(2," ",id) $ if port .eqs. ":80" .or. port .eqs. ": " then port = "" $ access = "http://" + host + port $ say " " ! Set IMPLIED CARRIAGE CONTROL. $ say " " ! Set CGI environment. $ crlf = f$fao("!/") $ say "Content-Type: text/html", crlf ! Send the Header. $!***** Change the Cover Page, appropriately for your site. ***** $ create net_link ! Example of writing via create. " ! Send CGI environment end tag. $ ELSE $! $! Query string for a search or document fetch is present. $! Do the search or send the document. $! $! Hit list options: $! ================= $ WWW_SEND_RAW_FILE = "TRUE" ! We're indexing whole files. $! WWW_SHOW_FILETYPE = "YES" ! If all are text files, don't bother $! WWW_MAXIMUM_HITS = 250 ! Use your discretion for this $ WWW_SHOW_SIZE = "YES" ! Bytes or KB $! WWW_SHOW_DATE = "YES" ! DD-MMM-YY $! WWW_SHOW_TIME = "YES" ! Replace -YY with HH:MM for current year $! WWW_USE_MDATE = "YES" ! Use last modified date (default is creation) $! $ DTquery "''P1'" "''P2'" "''P3'" "''database'" $ ENDIF $ exitSearch all html files on sci.wfeb.edu Search all html files on sci.wfeb.edu
This database is maintained by macrides@sci.wfeb.edu on host sci.wfeb.edu.The search matches your words against full document text. Access to this index is provided by the WWW to VMSIndex gateway. Please specify $! Now use say to permit symbol insertions. $ say "search words to find documents." $ say "Click here or use title as the search word to fetch a menu for all documents in this database. $ say "