[Date Prev][Date Next] [Chronological] [Thread] [Top]

[openldap 2.1.12] add a new index in database



Hi,

I need to add a new index in my already existing database.

I found about it 2 ways:
1. add the new index in the slapd.conf and use "slapindex" command without running slapd
=> "cold" command
=> calculate all indexes for all entries
=> it takes several days if database with 30000 entries

2. add the new index in the slapd.conf and make a restore using the "slapadd" command without running slapd
=> "cold" command
=> doesn't calculate all indexes for all entries ??? but creates the newindex.bdb file in the backend directory ?
=> it takes 2 hours if database with 30000 entries

Please, can you give me more information about new index adding ?
To add a new index (for example maillogin) in slapd.conf, is it like that ?
    database bdb
    suffix  "ou=CONTENT,o=alcatel,c=fr"
    rootdn  "cn=admin,ou=CONTENT,o=alcatel,c=fr"
    rootpw  secret
    directory /opt/openldap-clients-servers/var/openldap-data/bdb1
    # Indices to maintain
    index userid,pnnumber,submxid,maillogin eq,pres
    index objectClass eq

Best regards,
Helene