Indexed attributes but non indexed search
Hi !
There's something that I don't understand in my directory.
I have a request which is qualified as "non indexed" but when I look at the configuration of the indexes, it seems to be ok. Where am I wrong ?
******
Search filter (using logconv.pl):
Unindexed Search #1
- Date/Time: 05/Jul/2007:17:26:06
- Connection Number:619481
- Operation Number:2
- Etime:21
- Nentries: 20017
- IP Address:127.0.0.1
- Bind DN:uid=xxxxxxxxx
- Search Filter: (&(sn=*)(givenname=*))
******
indexed attributes :
dn: cn=sn,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
objectClass: top
objectClass: nsIndex
cn: sn
nsSystemIndex: false
nsIndexType: pres
nsIndexType: eq
nsIndexType: sub
dn: cn=givenName,cn=index,cn=userRoot,cn=ldbm database,cn=plugins,cn=config
objectClass: top
objectClass: nsIndex
cn: givenName
nsSystemIndex: false
nsIndexType: pres
nsIndexType: eq
nsIndexType: sub
*****************
Anyone an idea please ?
Thanks for your help.
# 1
> Hi !
>
> There's something that I don't understand in my
> directory.
>
> I have a request which is qualified as "non indexed"
> but when I look at the configuration of the indexes,
> it seems to be ok. Where am I wrong ?
>
> ******
> Search filter (using logconv.pl):
>
>Unindexed Search #1
> - Date/Time: 05/Jul/2007:17:26:06
>- Connection Number:619481
> - Operation Number:2
>- Etime:21
> - Nentries: 20017
>- IP Address:127.0.0.1
> - Bind DN:uid=xxxxxxxxx
>- Search Filter: (&(sn=*)(givenname=*))
>
>
> ******
> indexed attributes :
>
> dn: cn=sn,cn=index,cn=userRoot,cn=ldbm
> database,cn=plugins,cn=config
> objectClass: top
> objectClass: nsIndex
> cn: sn
> nsSystemIndex: false
> nsIndexType: pres
> nsIndexType: eq
> nsIndexType: sub
>
>
> dn: cn=givenName,cn=index,cn=userRoot,cn=ldbm
> database,cn=plugins,cn=config
> objectClass: top
> objectClass: nsIndex
> cn: givenName
> nsSystemIndex: false
> nsIndexType: pres
> nsIndexType: eq
> nsIndexType: sub
>
>
> *****************
>
>
> Anyone an idea please ?
>
> Thanks for your help.
Although you have defined a substring index for both attributes the actual size of the index lists for those indexes may have exceeded the maximum value for index lists as governed by the system-wide configuration attribute "nsslapd-allidsthreshold" which is set by default to 4000. When the list of IDs for an index grows to the nsslapd-allidsthreshold attribute size, the allids token is set on that index which causes the index to be disregarded and those searches become unindexed.
You may use the dbscan ("./dbscan -n -i -f /<path-to>/userRoot_[sn|givenname].db3) utility that comes with the Driectory Server Resource Kit in order to confirm that those indexes are marked allids.
Once confirmed you may consider to increase your nsslapd-allidsthreshold value - however changing the nsslapd-allidsthreshold attribute is costly, in that it requires you to rebuild (reindex) your database and will require thorough testing and examination of your data set as this is a system-wide attribute (in 5.x). It's also important not to set the nsslapd-allidsthreshold attribute so high as this puts the server in the position to constantly manage very large index ID lists.
There is a very interesting article called "Understanding Indexing and the ALLIDs Threshold" @ http://blogs.sun.com/DirectoryManager/?page=3 which discusses that topic in depth.