Substring indexes are used for searches on three-character groups, for example, sn=*abc*. The three-character groups are stored in the index. Substring indexes cannot be applied to binary attributes such as photos. The following figure shows a substring index for the SN attribute.
The Directory Server search algorithm includes optimizations for the following searches, however, these searches are more likely to reach the index list threshold:
Searches on two-character substrings with this format sn=*ab*
Searches on one-character group with this format sn=a*. Searches cannot be performed on one-character groups with this format sn=*a and sn=*a*
Directory Server builds an index of substrings according to its own built-in rules. Substring indexes cannot be configured by the system administrator.
When Directory Server receives a request to update an entry that has an attribute indexed for substrings, it must do the following tasks before performing the update and acknowledging the update to the client:
Determine whether the entry must be removed from the index
Determine whether and how modifications to the entry affect the index
Determine whether the entry IDs or lists of entry IDs must be added to or removed from the index
Maintaining substring indexes is relatively costly; the cost is a function of the length of the string indexed. To minimize cost, avoid unnecessary substring indexes, especially for attributes that have potentially long string values such as a description.