13.7. Deleting Indexes
This section describes how to remove attributes and index types from the index.
13.7.1. Deleting an Attribute from the Default Index Entry
When using the default settings of Directory Server, several attributes listed in the default index entry, such as
sn
, are indexed. The following attributes are part of the default index:
aci
|
cn
|
entryusn
|
givenName
|
mail
|
mailAlternateAddress
|
mailHost
|
member
|
memberOf
|
nsUniqueId
|
ntUniqueId
|
ntUserDomainId
|
numsubordinates
|
objectclass
|
owner
|
parentid
|
seeAlso
|
sn
|
telephoneNumber
|
uid
|
uniquemember
|
Warning
Removing system indexes can significantly affect the Directory Server performance.
For example, to remove the
sn
attribute from the default index:
- Remove the attribute from the
cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
entry:# ldapdelete -D "cn=Directory Manager" -W -p 389 -h server.example.com -x cn=sn,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
If you do not remove the attribute from this entry, the index for thesn
attribute is automatically recreated and corrupted after the server is restarted. - Remove the
cn=attribute_name,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
entry. For details, see Section 13.7.2, “Removing an Attribute from the Index”
13.7.2. Removing an Attribute from the Index
In certain situations you want to remove an attribute from the index. This section describe the procedure using the command line and using the web console.
13.7.2.1. Removing an Attribute from the Index Using the Command Line
To remove an attribute from the index:
- If the attribute to remove is listed in the
cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
default index entry, remove it from this entry first. For details, see Section 13.7.1, “Deleting an Attribute from the Default Index Entry”. - Remove the attribute from the index. For example:
# ldapdelete -D "cn=Directory Manager" -W -p 389 -h server.example.com -x cn=sn,cn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config
After deleting the entry, Directory Server no longer maintains the index for the attribute. - Recreate the attribute index. See Section 13.3, “Creating New Indexes to Existing Databases”.
13.7.2.2. Removing an Attribute from the Index Using the Web Console
To remove an attribute from the index:
- Open the Directory Server user interface in the web console. See Section 1.4, “Logging Into Directory Server Using the Web Console”.
- Select the instance.
- Open themenu.
- Select the suffix entry.
- Open the Indexes tab.
- Click the Delete Index.button next to the attribute for which you want to remove the index, and select
- Clickto confirm.
13.7.3. Deleting Index Types Using the Command Line
For example, to remove the
sub
index type of the sn
attribute from the index:
- Remove the index type:
# ldapmodify -D "cn=Directory Manager" -W -x dn: cn=sn,cn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config changetype: modify delete: nsIndexType nsIndexType: sub
After deleting the index entry, Directory Server no longer maintains the substring index for the attribute. - Recreate the attribute index. See Section 13.3, “Creating New Indexes to Existing Databases”.
13.7.4. Removing Browsing Indexes
This section describes how to remove browsing entries from a database.
13.7.4.1. Removing Browsing Indexes Using the Command Line
The entries for an alphabetical browsing index and virtual list view (VLV) are the same. This section describes the steps involved in removing browsing indexes.
To remove a browsing index or virtual list view index using the command line:
- Remove the browsing index entries from the
cn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config
entry. For example:# ldapdelete -D "cn=Directory Manager" -W -p 389 -h server.example.com -x "cn=MCC ou=People dc=example dc=com,cn=userRoot,cn=ldbm database,cn=plugins,cn=config" "cn=by MCC ou=People dc=example dc=com,cn=MCC ou=People dc=example dc=com,cn=userRoot,cn=ldbm database,cn=plugins,cn=config"
After deleting the two browsing index entries, Directory Server no longer maintains these indexed. - Recreate the attribute index. See Section 13.3, “Creating New Indexes to Existing Databases”.