Creating Indexes350 Netscape Directory Server Administrator’s Guide • January 2002Creating indexes from the command line involves two steps:• Using the ldapmodify command-line utility to add a new index entry or editan existing index entry.• Running the db2index.pl perl script to generate the new set of indexes to bemaintained by the server.The following sections describe the steps involved in creating indexes.Adding an Index EntryUse ldapmodify to add the new index attributes to your directory. If you want tocreate a new index that will become one of the default indexes, add the new indexattributes to the cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config entry.To create a new index for a particular database, add it to thecn=index,cn=instanceName,cn=ldbm database,cn=plugins,cn=config entry,where cn=instanceName corresponds to the name of the database.For information on the LDIF update statements required to add entries see “LDIFUpdate Statements,” on page 58.For example, you want to create presence, equality and substring indexes for the sn(surname) attribute in the Example1 database.NOTE You cannot create new system indexes because system indexes arehard coded in Directory Server.NOTE Avoid creating entries under cn=config in the dse.ldif file. Thecn=config entry in the simple, flat dse.ldif configuration file isnot stored in the same highly scalable database as regular entries. Asa result, if many entries, and particularly entries that are likely to beupdated frequently, are stored under cn=config, performance willprobably suffer.However,although we recommend you do not store simple userentries under cn=config for performance reasons, it can be useful tostore special user entries such as the Directory Manager entry orReplication Manager (supplier bind DN) entry under cn=config, asthis allows you to centralize configuration information.