Try doing the ldapsearch you used to test, but add numSubordinates
to the list
of attributes to return:
ldapsearch .... "big filter with (numSubordinates>=1) clause
removed" *
numSubordinates
Okay, something is wrong here. These results appear correct:
Looks like a problem with the numSubordinates index - it looks like
it is only
indexed for presence - try adding an equality index for
numSubordinates and
reindex.
I don't know when or why this changed - looks like a regression.
I added an index for equality by adding nsIndexTypes: eq to:
cn=numsubordinates,cn=index,cn=userRoot,cn=ldbm
database,cn=plugins,dn=config
cn=numsubordinates,cn=index,cn=NetscapeRoot,cn=ldb m
database,cn=plugins,dn=config
cn=numsubordinates,cn=default indexes,cn=config,cn=ldbm
database,cn=plugins,dn=config
But now my numSubordinates>=1 search comes up empty. Interestingly,
numSubordinates>4 doesn't work either, but in this case it returns
all, even those with numSubordinates <= 4.