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

Re: [openldap 2.1.12] add a new index in database

>> > 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
>> No, it took only a few minutes (say 5 min) to add the 25,000 entries
> ok but is it correct to use slapadd comand to add a new index to an
> already existing database ?

No, slapadd adds entries to an existing database, while slapindex
reindexes the database content.
But if you use slapadd for initital population of your database, the
appropriate indexfiles, as defined in slapd.conf, are created.

I use the slapadd command to restore my database using a ldif file resulting from the last valid "hot" backup (so it's like a big initial population)
So if I understood what you told me, in this case the slapadd command enables to add entries (restore my database)
and to index my database content with the new index too.

To summarize, slapadd command enables to add entries and to index the added entries using the definition of the index listed in the slapd.conf
True or false ?