HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

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
The cn attribute contains the name of the attribute to index, in this example the sn attribute.
The entry is a member of the nsIndex object class. The nsSystemIndex attribute is false,
indicating that the index is not essential to Directory Server operations. The multivalued
nsIndexType attribute specifies the presence (pres), equality (eq) and substring (sub)
indexes. Each keyword has to be entered on a separate line. The nsMatchingRule attribute
specifies the OID of the Bulgarian collation order.
Specifying an index entry with no value in the nsIndexType attribute results in all indexes
(except international) being maintained for the specified attribute. For example, the following
entry creates all index types for the sn index.
dn: cn=sn,cn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config
objectClass:top
objectClass:nsIndex
cn:sn
nsSystemIndex:false
nsIndexType:
You can use the keyword none in the nsIndexType attribute to specify that no indexes are
to be maintained for the attribute. This example temporarily disables the sn indexes on the
Example1 database by changing the nsIndexType to none:
dn: cn=sn,cn=index,cn=Example1,cn=ldbm database,cn=plugins,cn=config
objectClass:top
objectClass:nsIndex
cn:sn
nsSystemIndex:false
nsIndexType:none
For a complete list of collation orders and their OIDs, see “Internationalization” (page 573), and
for the index configuration attributes or the ldapmodify command line utility, see the HP-UX
Directory Server configuration, command, and file reference.
NOTE:
Always use the attribute's primary name (not the attribute's alias) when creating indexes. The
primary name of the attribute is the first name listed for the attribute in the schema; for example,
uid for the user ID attribute. See Table 56 (page 468) for a list of all primary and alias attribute
names.
11.2.2.2 Running the db2index.pl script
After creating an indexing entry or added additional index types to an existing indexing entry,
run the db2index.pl script to generate the new set of indexes to be maintained by the Directory
Server. After the script is run, the new set of indexes is active for any new data added to the
directory and any existing data in the directory.
To run the db2index.pl Perl script:
1. Run the db2index.pl Perl script.
/opt/dirsrv/slapd-instance_name/db2index.pl \
-D "cn=Directory Manager" -w secret -n ExampleServer -t sn
For more information about using the db2index.pl Perl script, see the HP-UX Directory
Server configuration, command, and file reference.
456 Managing Indexes