-.Ss Index Database
-The index database,
-.Pa mandoc.index ,
-is a
-.Xr recno 3
-database with record values consisting of
-.Pp
-.Bl -enum -compact
-.It
-a nil-terminated filename,
-.It
-a nil-terminated manual section,
-.It
-a nil-terminated manual title,
-.It
-a nil-terminated architecture
-.Pq this is not often available
-.It
-and a nil-terminated description.
-.El
-.Pp
-Both the manual section and description may be zero-length if the record
-is unassigned.
-Entries are sequentially-numbered, but the filenames are unordered.
-.Ss Keyword Database
-The keyword database,
-.Pa mandoc.db ,
-is a
-.Xr btree 3
-database of nil-terminated keywords (record length is non-zero string
-length plus one) mapping to a 8-byte binary field consisting of the
-keyword type and source
-.Sx Index Database
-record number.
-The type, a 32-bit bit-mask in host order, consists of the following
-fields:
-.Pp
-.Bl -tag -width Ds -offset indent -compact
-.It Li 0x01
-The name of a manual page as given in the NAME section.
-.It Li 0x02
-A function prototype name as given in the SYNOPSIS section.
-.It Li 0x04
-A utility name as given in the SYNOPSIS section.
-.It Li 0x08
-An include file as given in the SYNOPSIS section.
-.It Li 0x10
-A variable name as given in the SYNOPSIS section.
-.It Li 0x20
-A standard as given in the STANDARDS section.
-.It Li 0x40
-An author as given in the AUTHORS section.
-.It Li 0x80
-A configuration as given in the SYNOPSIS section.
-.It Li 0x100
-Free-form descriptive text as given in the NAME section.
-.It Li 0x200
-Cross-links between manuals.
-Listed as the link name, then a period, then the link section.
-If the link has no section, the period terminates the string.
-.It Li 0x400
-Path reference as given in the FILES section.
-.It Li 0x800
-Environment variable as given in the ENVIRONMENT section.
-.It Li 0x1000
-Error codes as given in the ERRORS section.
-.El
-.Pp
-The last four bytes are a host-ordered record number within the
-.Sx Index Database .
-.Pp
-The
-.Nm
-utility is
-.Ud
-.Sh IMPLEMENTATION NOTES
-The time to construct a new database pair grows linearly with the
-number of keywords in the input files.
-However, removing or updating entries with
-.Fl u
-or
-.Fl d ,
-respectively, grows as a multiple of the index length and input size.