home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / src / gopher / gopher1.01 / doc / gindexd.doc < prev    next >
Text File  |  1992-04-07  |  8KB  |  246 lines

  1. What is gindexd?
  2. ----------------
  3.  
  4. Gindexd allows you to serve indexes of data residing on a gopher
  5. server.  Gindexd will allow you to search through a voluminous amount
  6. of data quickly.
  7.  
  8.  
  9. Gopher Index server documentation.
  10. ----------------------------------
  11.  
  12. There are two different versions of gindexd, one that is specifically
  13. tailored for NeXT machines, and one that is built using code from the
  14. WAIS project.
  15.  
  16.  
  17. Installation instructions for the NeXT gindexd.
  18. -----------------------------------------------
  19.  
  20. First get the libtext and btree libraries.  Available as a separate
  21. tar file called NeXTtext.tar.Z.  Go to the gindexd directory and
  22. untar it.  The files libbtree.a and libtext.a will be created. You may
  23. copy them to /usr/local/lib if you so desire.
  24.  
  25. Type "make next"
  26.  
  27.  
  28. Installtion instructions for the WAIS gindexd.
  29. ----------------------------------------------
  30.  
  31. First get the wais distribution ftp to "think.com" and get
  32. /wais/wais-8-b4.tar.Z  Untar this and edit the makefiles appropriate
  33. for your system.
  34.  
  35. After you untar the thing, go into the top level directory and type 
  36.  
  37. "make lib"
  38. "make ir"
  39.  
  40. Or just type make if you want the whole thing.
  41.  
  42. Now copy the gindexd directory into the same level as the directories
  43. ir, x, etc.  i.e.
  44.  
  45. % cp -r index-server {your wais directory}/
  46.  
  47. Go into the index-server directory and type "make wais".
  48.  
  49.  
  50. How To Set Up An Index Server
  51. -----------------------------
  52.  
  53. An full-text index is used to rapidly find data in a set of files.
  54. The first step in making a gopher index server is to build the index
  55. on your data files.
  56.  
  57. For the NeXT this command is called ixBuild.
  58. For the WAIS server this command is called waisindex.
  59.  
  60. Okay, how about a real world example?  Suppose that you have a
  61. directory structure that contains your grandmother's favorite recipes
  62. located in /home/mudhoney/recipes/.  Also assume that there are
  63. subdirectories for cakes, pies, and stews i.e. :
  64.  
  65. -------
  66. % pwd
  67. /home/mudhoney/recipes
  68.  
  69. % ls 
  70. cakes/ pies/  stews/ 
  71.  
  72. -------
  73.  
  74. Assume also that you will be running a gopher data server on the
  75. directory /home/mudhoney/recipes.
  76.  
  77.  
  78. Building the index with the NeXT and ixBuild.
  79. ---------------------------------------------
  80.  
  81. Go into the directory you want as the root level of your index.  If
  82. you want to index all of the recipes you'd type the following:
  83.  
  84.   cd /home/mudhoney/recipes
  85.   mkdir .index
  86.   ixBuild -V
  87.  
  88. This will make an index in the file:
  89.  
  90.   /home/mudhoney/recipes/.index/index.ixif 
  91.  
  92. If you wanted to just index the pies subdirectory you would do the
  93. following:
  94.  
  95.   cd /home/mudhoney/recipes/pies
  96.   mkdir ../.index
  97.   ixBuild -V -i../.index/index.ixif
  98.  
  99. ...or
  100.  
  101.   cd /home/mudhoney/recipes/pies
  102.   mkdir .index
  103.   ixBuild -V -i.index/index.ixif pies
  104.  
  105. It's important that the filenames that are generated by ixBuild have
  106. the same format that is given by the gopher server!  You can easily
  107. test this by using ixFind.  Make sure it doesn't contain the entire
  108. path.  Also make sure that when you're indexing a subdirectory that the
  109. previous directories up to the root directory get added to the path by
  110. ixBuild.
  111.  
  112.  
  113. Building the Index with waisindex
  114. ---------------------------------
  115.  
  116. With waisindex it isn't necessary to be in the root directory of the
  117. gopher server.  The WAIS indexer stores filenames with their absolute
  118. paths, this causes problems later.
  119.  
  120. If you want to index the whole recipe collection in
  121. /home/mudhoney/recipes you'd do the following:
  122.  
  123.   waisindex -r /home/mudhoney/recipes
  124.  
  125. The waisindex program will create a bunch of files starting with
  126. index.  These files together comprise an index to your data.
  127.  
  128.  
  129. If you wanted to just index the pies subdirectory you would do the
  130. following:
  131.  
  132.   waisindex -r /home/mudhoney/recipes/pies
  133.  
  134.  
  135. Starting Up the Index Server
  136. ----------------------------
  137.  
  138. Now that you have indexes you can actually run the gopher index server
  139. on them.  The first step you should do is to move the index files into
  140. a directory all their own.  Let's say that you chose
  141. /home/mudhoney/indexes/recipes.
  142.  
  143. So, for the NeXT you would:
  144.  
  145.   mkdir /home/mudhoney/indexes/recipes
  146.   mkdir /home/mudhoney/indexes/recipes/.index
  147.   cp {originaldir}/.index/index.ixif /home/mudhoney/indexes/recipes/.index
  148.  
  149. For the WAIS version you would:
  150.  
  151.   mkdir /home/mudhoney/indexes/recipes
  152.   cp index.* /home/mudhoney/indexes/recipes
  153.  
  154. The next step is very important.  You must create a "hostdata" file in
  155. the same directory as the indexes.  In this case you'd make a file
  156. called "/home/mudhoney/indexes/recipes/hostdata".
  157.  
  158. In this file you need 2 to 3 pieces of information.  The first line of
  159. the hostdata file should contain the hostname of the machine that is
  160. running a gopher server for the indexed data.  The second line
  161. contains the port that the data server is running at.
  162.  
  163. If you're running the WAIS version of gindexd then you'll have to add
  164. a third line.  This line should contain the directory of the gopher
  165. data server.  Gindexd will strip this off of all responses it sends
  166. back.  (This is why the WAIS indexing engine causes problems, it puts
  167. in the whole path, not the relative path)
  168.  
  169. For example, our recipes index "hostdata" file would look like the
  170. following:
  171.  
  172.   mudhoney.micro.umn.edu
  173.   150
  174.   /home/mudhoney/recipes
  175.  
  176. This assumes that there is a gopher data server running on
  177. mudhoney.micro.umn.edu at port 150.  The nice part about using the
  178. hostdata file is that you can move indexes off to other machines.  Put
  179. the indexes on the big sexy computers.  And put the actual data off on
  180. some sluggish machine.
  181.  
  182. {As of version 0.7 you can override the default title name returned by 
  183.  gindexd.  Add the keyword "ShowHeadline" at the end of the hostdata
  184.  file.
  185.  
  186.  Also you can add the keyword "ShowDate" in the hostdata file.  This will
  187.  put the date of the document in the Title.
  188. }
  189.  
  190. After this step is completed you can actually run the gindexd daemon!
  191. There two required options.  The usage is:
  192.  
  193.   gindexd [-DI] -p <portnumber> -i <indexdirectory> [-d databasename]
  194.           [-H alternate hostdata file]
  195.  
  196. The -p sets the port to run at.  You can use any unused port.  The -i
  197. sets the index directory to look for indexes.  (For the NeXT version
  198. do *not* specify the subdirectory ".index".  Give the directory above
  199. it instead).  The -D specifies that we should run in debug mode.  The
  200. -d parameter is only useful for the Wais indexer, it allows you to
  201. specify a database name other than "index".
  202.  
  203. The -I parameter should be used when you are starting the indexer from
  204. inetd.  It's also useful when testing whether or not your indexes have
  205. been built successfully.
  206.  
  207. The -H parameter can be used to specify an alternative hostdata file.
  208.  
  209. Here is the command we would use to start our recipe index daemon:
  210.  
  211.   gindexd -p 151 -i /home/mudhoney/indexes/recipes
  212.  
  213.  
  214.  
  215. Setting Up Links To Index Servers
  216. ---------------------------------
  217.  
  218. This part is pretty simple.  Just create a .link file on your gopher
  219. data server that contains the pertinant information.  Just make sure
  220. that you get the "Type=" line correct.  An index server is itemtype 7.
  221.  
  222. Here's what we would use for our recipe example:
  223.  
  224.   Type=7
  225.   Host=mudhoney.micro.umn.edu
  226.   Port=151
  227.   Path=
  228.   Name=Grandma's Recipe Book
  229.  
  230.  
  231. By fiddling with the Path= parameter and changing the type to "Type=1"
  232. you can do some interesting things.  When the user accesses the
  233. following list they will get a directory of all the stuff that has
  234. rhubarb pies in it.
  235.  
  236.   Type=1
  237.   Host=mudhoney.micro.umn.edu
  238.   Port=151
  239.   Path=rhubarb pie
  240.   Name=Grandma's Rhubarb pie recipes.
  241.   
  242. This type of thing is especially usefull for data that changes
  243. rapidly, like news.  We've set up one such link that searches our
  244. campus newspaper for the "What's Doing" schedule of events.
  245.  
  246.