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

ldapsearch by uid and mailAlternateAddress - is this indexing problem?



Hello,

I've have a problem with slapd/ldapsearch.

First time I try to search only with uid as filter which 
did not return any results, but then with the second search,
mailAlternateAddress as filter i've get expected response
Could this be cause of corrupted uid index?


Searches and their results:

** With uid as filter **

# extended LDIF
#
# LDAPv3
# base <ou=People,dc=foo,dc=bar> with scope one
# filter: (uid=someuid)
# requesting: ALL
#

# search result
search: 2
result: 0 Success

** Next, search with mailAlternateAddress as filter **

# extended LDIF
#
# LDAPv3
# base <ou=People,dc=foo,dc=bar> with scope one
# filter: (mailAlternateAddress=john.doe@foobar.net)
# requesting: ALL
#

# someuid, People, foo.bar
dn: uid=someuid,ou=People,dc=foo,dc=bar
uid: someuid
sn: Doe
cn: John
uidNumber: 123456
gidNumber: 12345
mailAlternateAddress: john.doe@foobar.net
... etc ...

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1



** slapd.conf as follows **

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/qmail.schema
include         /etc/ldap/schema/amavis.schema.new

schemacheck     on
pidfile         /var/run/slapd/slapd.pid
argsfile        /var/run/slapd.args
threads 25
loglevel        0
defaultsearchbase "dc=foo,dc=bar"
modulepath      /usr/lib/ldap
moduleload      back_bdb
backend         bdb
database        bdb
checkpoint 128 15
suffix          "dc=foo,dc=bar"
directory       "/var/lib/ldap"
lastmod         on
rootdn "cn=damager,ou=system,dc=foo,dc=bar" 
rootpw {MD5}*REMOVED*
index uid                       eq
index uidNumber                 eq
index gidNumber                 eq
index mailAlternateAddress      eq
index mail                      eq
index objectClass               eq
lastmod on
sizelimit 1000000
cachesize 90000
searchstack 4
include /etc/ldap/slapd.access.conf