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

Re: Indexing field causes 0 search results (DN attribute search fails)

> > Out of curiosity, in your case, is the attribute you're indexing one that
> would use caseIgnoreMatch?
> I'm using a custom attribute with 121.1.12 syntax and distinguishedNameMatch used for EQUALITY. Same symptoms, though.

OK, according to the source dnMatch == caseIgnoreMatch.  And, I appear to have
isolated the problem (and it isn't because caseIgnoreFilter generates random

I'm using OpenLDAP 2.0.27, just so its stated.  And when you store an attribute
which is a distinguishedNamed or some variant, it appears that OpenLDAP does
not "canonicalize" the stored DN, stripping out extra spaces and the like. 
However, when you search, it does.

When I store the following:

dalMailAliasOwner: rdn=e189b1e779f8f251a965cf945b36144b, cn=People, dc=Dal, dc=Ca

I see the following:

slapd[3662]: caseIgnoreIndexer value = 'RDN=E189B1E779F8F251A965CF945B36144B, CN=PEOPLE, DC=DAL, DC=CA'

However, when I search with:

ldapsearch '(dalMailAliasOwner=rdn=e189b1e779f8f251a965cf945b36144b, cn=People, dc=Dal, dc=Ca)'

I see:

slapd[3662]: caseIgnoreFilter value = 'RDN=E189B1E779F8F251A965CF945B36144B,CN=PEOPLE,DC=DAL,DC=CA'

When I change my ldif to remove all spaces between DN components, the search
works fine.  (Vaguely annoying, I must say...)