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

Re: Can I remove an existing index?

Ole Nomann Thomsen wrote:

> So: Can't i simply drop the index from the config file, restart, and
> thats it? That is, remove the line:
> index           code     eq,sub
> And perhaps the code.dbb file from the database directory? Perhaps
> slapindex too?
> Further tests indicate that it works, lookups, updates and everything
> seem OK. But there is a worrying warning in the logfile:
> 2007-09-11 12:09:53.742266500 <= bdb_equality_candidates: (code)
> index_param failed (18)
> The warning persists after slapindex, but is not there when I search for
> attributes that was "born" without an index.
> So will it break eventually? Or do I need to tell the backend something?
> Background (as much as I can dig up, perhaps too much):
> OpenLDAP: slapd 2.3.25
> Backend: back_bdb, vers 4.2 (Berkeley DB, Btree, version 9)
> Linux: Debian 2.6.18
> Sears filter (always): "(&(uid=...)(code=...))" (experimentally shown to
> work fine without index on "code")
> And the same question for:
> OpenLDAP: slapd 2.2.26
> Backend: ldbm (Berkeley DB, Btree, version 8)
> Linux: Mandrake Linux 9.0 3.2-1mdk
> Sears filter (always): "(&(uid=...)(code=...))"
> Thanks for reading this far :-) and for any answers.

1) stop slapd; remove the index line and the index file; restart slapd;
no need for slapindex

2) that log is only informative.  It's correctly telling you that a
filter uses a non-indexed attribute, but you may safely ignore it if you
know it's not contributing to limiting the number of candidates.  And it
is by no means indicative of any issue with the database, like
corruption or so.  In recent versions (2.3.38, I believe) that message
has been updated to reflect its real meaning: "the filter contains an
unindexed attribute".  The way you showed it above definitely makes it
more scary than it is, since no failure really occurred.


Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Email:   pierangelo.masarati@sys-net.it