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

Re: LDAP-Queries with wildcards...



Tomas Hein wrote:

> I use OpenLDAP 2.0.7 and i have following Problem :
>  there are ca. 10000 User-Entries in the directory,
> i have tested the following searchfilters ( 'user_id' is just an example
>
> ) :
>
> 1)   '(& (objectclass=inetOrgPerson) (uid=user_id) )'     -> the user is
>
> found
> 2)   '(& (objectclass=inetOrgPerson) (uid=*user_id*) )'  -> there are
> users, that are not found ( ca 6% of all users - WHY?)
> 3)   '(& (objectclass=inetOrgPerson) (uid=*user_id) )'    -> the  user
> is rapidly found
>
> - Queries with wildcards at the begin and at the end (2) don't found all
>
> users. ( UserId has the syntax 'user_xxx_St_xxx' e.g.:
>   user 'user_7_St_205' is found and user 'user_15_St_160' not <both
> entries exist in the directory!> ).
>
> any ideas ?

There are a number of possibilities:
- index corruption
- size/time limit exceeded
    (e.g. you query for (uid=user_15_St_160) and you get it,
    the you query for (uid=user_15_St_16*) and there are
    100 occurrences of user_15_St_16* BEFORE
    user_15_St_160, where 100 is your default size limit,
    so you don't get it; note that BEFORE means in order
    of candidate fetching, which has nothing to do with any
    lexicographic order)
- acl problem
    (e.g. you bound differently when performing the two searches)
- anything else I didn't figure out

Pierangelo


--
Dr. Pierangelo Masarati               | voice: +39 02 2399 8365
Dip. Ing. Aerospaziale                | fax:   +39 02 2399 8334
Politecnico di Milano                 | mailto:masarati@aero.polimi.it
via La Masa 34, 20156 Milano, Italy   | http://www.aero.polimi.it/~masarati