HP-UX Directory Server 8.1 administrator guide
11.4.2.1 Deleting an index entry
Use the ldapdelete command line utility to delete either the entire indexing entry or the
unwanted index types from an existing entry.
• To delete the indexes for a particular database, remove the index entry from the
cn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config entry,
where cn=database_name corresponds to the name of the database.
• To delete a default index, remove it from the cn=default indexes,cn=config,cn=ldbm
database,cn=plugins,cn=config entry.
1. Run ldapdelete.
ldapdelete -D "cn=Directory Manager" -w secret -h ExampleServer
-p 389 "cn=sn,cn=index,cn=Example1,cn=ldbm database,cn=plugins,cn=config"
For complete information on ldapdelete, see the HP-UX Directory Server configuration,
command, and file reference.
2. For example, delete the presence, equality, and substring indexes for the sn attribute on the
database named Example1:
dn: cn=sn,cn=index,cn=Example1,cn=ldbm database,cn=plugins,cn=config
objectClass:top
objectClass:nsIndex
cn:sn
nsSystemIndex:false
nsIndexType:pres
nsIndexType:eq
nsIndexType:sub
nsMatchingRule:2.16.840.1.113730.3.3.2.3.1
Table 11-5 “ldapdelete options” describes the ldapdelete options.
Table 11-5 ldapdelete options
DescriptionOption
Specifies the distinguished name with which to authenticate to the server. The value must be a
DN recognized by the Directory Server, and it must also have the authority to modify the entries.
-D
Specifies the password associated with the distinguished name specified in the -D option.-w
Specifies the name of the host on which the server is running.
-h
Specifies the port number that the server uses.
-p
After deleting the index entry, the presence, equality, and substring indexes for the sn attribute
are no longer maintained by the Example1 database.
11.4.2.2 Running the db2index.pl script
After deleting an indexing entry or some of the index types from an indexing entry, run the
db2index.pl script to generate the new set of indexes to be maintained by the Directory Server.
After you run the script, the new set of indexes is active for any new data you add to your
directory and any existing data in your directory.
To run the db2index.pl Perl script:
1. Run the db2index.pl Perl script. For example:
/opt/dirsrv/slapd-instance_name/db2index.pl \
-D "cn=Directory Manager" -w secret -n Example1
For more information about using the db2index.pl Perl script, see HP-UX Directory Server
configuration, command, and file reference. Table 11-6 “db2index options” describes the db2index.pl
options used in the examples:
11.4 Deleting indexes 465