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

Re: OpenLDAP 2.1.17 and index directive



Maybe you should run slapindex (works for bdb... I don't know if it works for ldbm) to generate the index files...
Then restarting slapd could help...


Bruno

Thieu-Hon Tran wrote:

Hello,

I'm using OpenLDAP 2.1.17 on a linux machine. The slapd.conf only
contains backend and database definitions for one backend & database:
------
[...]
backend ldbm
database        ldbm
[...]
------

When I start ldapsearch with the following parameters:
     ldapsearch sn=Tran sn cn

I get the following result:

# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: sn=Tran
# requesting: sn cn
#

# tran-ms, [...]
dn: uid=tran-ms,[...]
cn: Tran, Thieu-Hon
sn: Tran

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1


But when I add the following line to slapd.conf:
     index mail,cn,sn,givenName,uid eq,sub

the command "ldapsearch sn=Tran sn cn" shows the following:

# extended LDIF
#
# LDAPv3
# base <> with scope sub
# filter: sn=Tran
# requesting: sn cn
#

# search result
search: 2
result: 0 Success

# numResponses: 1


Could someone explain this to me? I expected that no matter which
indices are maintained, the same search query should return the
same result, and the only difference is that in some cases searching
is accelerated, if an appropriate index is available. Did I get/do
something wrong?

Also, can somebody point me to a more detailed explanation of
OpenLDAP administration than the 'OpenLDAP 2.1 Administrator's Guide'?
Some other documentation on the web maybe?

Best regards,
     Thieu-Hon Tran