Creating Indexes from the Command-Line

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 multi-valued 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 Appendix D, Internationalization, and for the index configuration attributes or the ldapmodify command-line utility, see the Directory Server Configuration, Command, and File Reference.

NOTE

375

Page 395
Image 395
HP UX Red Hat Direry Server Software manual Creating Indexes from the Command-Line