First, I'm running 2.4.27
A year and a half ago, running 2.4.something-less-than-27, we installed a device which queried LDAP and was causing a load on the ldap servers. I found it was looking for an attribute we didn't have.
I indexed the attribute and I believed that the load was reduced.
I did not add the objectclass which offered the attribute to our objectclasses.
Was I imagining things?
Recently, we have another black box that queries ldap. I can't control the attributes which it requests.
I added the attributes to the index and ran the slapindex and no new .bdb files were generated, even using the -q -t flags, which claims to truncate a database before scanning for the attribute. That sounded like a way to maybe trick it into making an empty database, but no dice.
As an experiment, I ran slapadd to create a new database, with those attributes in the index list. It didn't add any of them, nor did it create that single attribute which I believed I had "fixed" last year. I'm reasonably sure that prior openldap versions of both slapindex and slapadd would create the index for an attribute listed as indexed without it appearing in the data.
I'm curious to know if I was wrong that indexing an attribute would speed the search even if the attribute did not appear in the schemas used.
Also, does this mean that I have to add whatever schema that new ldap-client black-box wants to search in order to make the index in order to reduce that client's ldap server load?
Thanks for any insights.