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

Re: commit: ldap/doc/man/man8 slapindex.8

Hallvard B Furuseth wrote:
hyc@OpenLDAP.org writes:
	slapindex.8  1.28 -> 1.29
Document truncate mode

Please clarify the doc of this. I mean, I had no idea slapindex had a non-truncate mode.

Yeah, how about that... The option was in slapcommon.c since rev 1.1 in 1999, but it wasn't actually in the getopt string or in any usage info. Seems nobody noticed in all this time.

Does slapindex by default not delete old indexes

Right. It only adds new data by default.

> or does is mean something else? When
should one _not_ use truncate mode?

In BerkeleyDB, you cannot use truncate mode with transactions. So in the default mode (without -q), back-bdb/hdb silently removes the truncate flag. (Perhaps it should print an error and abort instead.)

You probably would not want the truncate mode if you've just added a new index type to an already indexed attribute. E.g., you had
index cn eq
and you changed it to
index cn eq,sub
-- Howard Chu
Chief Architect, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/