HP-UX Directory Server 8.1 administrator guide

To improve search performance, particularly for sites with many wildcard searches, the search
string length for indexed searches can be changed. Directory Server has three attributes that
allow you to change the minimum number of characters required for an indexed search:
The nsSubStrBegin attribute sets the required number of characters for an indexed search
for the beginning of a search string, before the wildcard.
abc*
The nsSubStrMiddle attribute sets the required number of characters for an indexed
search where a wildcard is used in the middle of a search string. For example:
ab*z
The nsSubStrEnd attribute sets the required number of characters for an indexed search
for the end of a search string, after the wildcard. For example:
*xyz
The default substring search length for the string triplet (before, middle, and end) is 3, 3, and 3,
meaning every search requires a minimum of three characters, in every wildcard position.
For any attribute index to have alternate string lengths, add the extensibleObject object
class to the entry, then set the substring search lengths.
1. Set the new key length for the specific attribute index. This requires adding the
extensibleObject object class, then adding the nsSubStrBegin, nsSubStrEnd, or
nsSubStrMiddle attributes as appropriate. For example:
ldapmodify -D "cn=directory manager" -w secret -p 389 -h server.example.com
dn: attribute_name, cn=index, cn=database_name,
ldbm database, cn=plugins, cn=config
objectClass: extensibleObject
nsSubStrBegin: 2
nsSubStrMiddle: 2
nsSubStrEnd: 2
2. Stop the server.
/opt/dirsrv/slapd-instance_name/stop-slapd
3. Recreate the attribute index. If even one of the substring search width options is changed,
then the entire index must be recreated.
/opt/dirsrv/slapd-instance_name/db2index -t attribute_name
4. Start the server again.
/opt/dirsrv/slapd-instance_name/start-slapd
11.4 Deleting indexes
This section describes how to delete presence, equality, approximate, substring, international,
and browsing indexes for specific attributes.
NOTE:
Because Directory Server 8.1 can operate in either a single or multidatabase environment, you
have to delete any unwanted indexes from every database instance. Any default indexes you
delete will not be deleted from previous sets of indexes on existing database instances.
“Deleting indexes from the server console”
“Deleting indexes from the command line”
11.4 Deleting indexes 463