# Index Database

The index database is a file named "index.db" (configurable) that resides in the starting directory. The index database contains a copy of the file information for each HTML file that contains one or more non-hidden keywords. The database is used to allow fast keyword searches when building symlinks files or using CGI mode.

The index database is generated from the actual file information contained in the HTML files. It is updated incrementally by the "maketree" command. When the "maketree" command updates the index database, it first removes all old records whose paths match the current directory tree, and then scans the current directory tree for new records. Existing records that are not part of the current directory tree are not changed. This process is optimized for speed. The file is always maintained in sorted order, sorted alphabetically by Title.

## Creating an Index Database

Before an index database can be updated by the "maketree" command, it must be created. To create an index database, simply create an empty (zero length) text file in the starting directory, and name it "index.db". You can do this in Windows Explorer by selecting the starting directory, right-clicking in the file window, selecting New `->` Text Document from the shortcut menu, and naming the file "index.db" (when it prompts you to change the filename extension, press "Yes").

## File Format

The file is organized as a tab-delimited database. Each line represents a single HTML file. Each line contains the following tab-delimited fields:

1. Title 1
2. Full file path 3
3. Description 1
4. Keyword List 1
5. Supplimentary Information 2
6. Thumbnail list 4
7. Sort Order
8. Alias flag
9. File type 5

Notes:

1 | Plain text (no HTML character references).
2 | HTML encoded text. May contain HTML character references.
3 | This is a complete Windows file path, including the drive letter. If this path refers to a slide file, it is the path to the corresponding image file, not the HTML slide file itself.
4 | This is a list of thumbnail file names and their dimensions. The syntax is as follows: `` filename`:`width`,`height[`;`filename`:`width`,`height[`;` ...]] Where filename is the file name or relative Windows file path to the thumbnail image file. If it's a relative path, it is relative to the directory which contains the HTML file (specified by field 2).
5 | This is encoded as a 4-digit hexadecimal number.

The format of fields 5 through 11 are subject to change with future revisions.

Table of Contents