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