Sun Directory Services 3.1 Administration Guide

Indexing Directory Data

A data store can contain a number of attribute indexes to help optimize the speed of access to directory information. An attribute index is a list of entries containing a given attribute or attribute value. You can index attributes using any of the following matching rules:

In a data store having the default characteristics, the following attributes are indexed:

The advantage of indexing is that it optimizes access for indexed attributes. The disadvantages are that it uses more disk space, and that adding and modifying entries takes longer.

When you add or modify an entry after an index has been created, the index is automatically updated. However, if you create a new index and the data store already contains entries, those entries are not automatically included in the index. Indexes are not automatically updated when entries are removed from the directory, so the size of the index files does not reduce as entries are removed.

To update all the indexes defined in a data store, choose Refresh Index from the Data Store menu of the data store window (see "Directory Maintenance".) Regenerating the indexes for a data store can take several minutes, depending on the number and complexity of the indexes defined. For example, regenerating the default indexes for a data store of 20,000 entries takes approximately five minutes.

To Create Indexes

  1. Whether you are creating a new data store or modifying an existing one, select Index from the Create menu.

    The Add Index window is displayed.

  2. Specify the name of the indexed attribute and the index types.

    Use the Set button to select attributes from a list. You can specify several attributes separated by commas. These indexed attributes will have the same index types.

  3. Click Apply to add the index.