HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

11 Managing Indexes
Indexing makes searching for and retrieving information easier by classifying and organizing
attributes or values. This chapter describes the searching algorithm itself, placing indexing
mechanisms in context, then describes how to create, delete, and manage indexes.
Topics include:
About indexes” (page 449)
“Creating indexes” (page 454)
“Changing the width for indexed substring searches” (page 460)
“Deleting indexes” (page 461)
“Managing indexes” (page 465)
Attribute name quick reference table” (page 467)
11.1 About indexes
This section provides an overview of indexing in Directory Server. It contains the following topics:
About index types” (page 449)
About default, system, and standard indexes” (page 450)
“Overview of the searching algorithm” (page 451)
“Balancing the benefits of indexing” (page 453)
11.1.1 About index types
Indexes are stored in files in the directory's databases. The names of the files are based on the
indexed attribute, not the type of index contained in the file. Each index file may contain multiple
types of indexes if multiple indexes are maintained for the specific attribute. For example, all
indexes maintained for the common name attribute are contained in the cn.db4 file.
Directory Server supports the following types of index:
Presence index (pres) contains a list of the entries that contain a particular attribute, which is
very useful for searches. For example, it makes it easy to examine any entries that contain
access control information. Generating an aci.db4 file that includes a presence index
efficiently performs the search for ACI=* to generate the access control list for the server.
The presence index is not used for base object searches.
Equality index (eq) improves searches for entries containing a specific attribute value. For
example, an equality index on the cn attribute allows a user to perform the search for cn=Babs
Jensen far more efficiently.
Approximate index (approx) is used for efficient approximate or sounds-like searches. For
example, an entry may include the attribute value cn=Robert E Lee. An approximate
search would return this value for searches against cn~=Robert Lee, cn~=Robert, or
cn~=Lee. Similarly, a search against l~=San Fransisco (note the misspelling) would
return entries including l=San Francisco.
Substring index (sub) is a costly index to maintain, but it allows efficient searching against
substrings within entries. Substring indexes are limited to a minimum of three characters for
each entry.
For example, searches of the form cn=*derson , match the common names containing
strings such as Bill Anderson, Jill Henderson, or Steve Sanderson. Similarly, the
11.1 About indexes 449