# Apache patch B68 (built in searchable indexing)

## First appears in Apache 0.6 ?

Date:
  April 12th '95
Documentation:
  Usage & technical explanation
Purpose

  Builds into Apache a simple keyowrd based indexing mechanism.

New behaviour

  After configuring conf/mime.types with a filename extension to be treated as a httpd index file, requesting a URL of this type will return an ISINDEX response. Subsequent requests to the same document with arguments causes Apache to search for those arguments as keywords describing URLs.

Configuration
  file: mime.conf

  Add the httpd/auto-index MIME type, with your chosen filename extension. We recommend using indx, but you can choose any extension, e.g.

      httpd/auto-index        indx

Index file formats

  The format for an index file is very simple.

  The first line of the index file will be used to generate the <TITLE> message, and a <H1> heading for the HTML output.
  Choose something simple, which explains the purpose of the index e.g.

      Keyword searchable index for Widget INC resources

  Subsequent lines in the index file will,

  1. store keywords when the line starts "K: "
  2. store URLs when the line starts "U: "
  3. store descriptions when the line starts "D: "
  4. otherwise be ignored.
  e.g.

      Keyword searchable index for Widget INC resources

       this line doesn't start with "K: " "U: " or  "D: " so it will be ignored
      K: about Widget
      U: /help/about_widget_inc.html

      D: Information about the Widget INC company, including contact addresses.

      K: logo tradmark
      U: /images/widget.gif
      D: Widget INC company's logo and trademark, a 59k 256 color GIF.

      another line to be ignored - might be a comment

      K: sales buy orders purchase sell
      U: /cgi-bin/sales/order.pl
      D: An order form for Widget INC products.

  n.b.For best results, "U: " lines should appear before "D: " lines.

How does it work ?

  The mime type httpd/auto-index is intercepted by Apache. A new searching routine then scans the index file for case insensitive matches on keyword lines. In the event of a match, a descriptive list item (DT/DD) is output.

  Thanks to the simplistic model, there's minimal overhead in supporting these index files.

Here's some example output based on the index file above. The keywords About logo yield...

> # Keyword searchable index for Widget INC resources

> about
>   Information about the Widget INC company, including contact addresses.
> logo
>   Widget INC company's logo and trademark, a 59k 256 color GIF.