[Date Prev][Date Next]
Re: subinitial and subfinal indexes not working?
There is a default constant minimal length for the subinitial
and subfinal indexes. I think it is set to either 2 or 3 by default
and searches for prefixes less then that (such as words differing by
one character or none at all) will be basically linear searches through
This minimal length can be changed (can't remember what the constant
is but it's in one of the files where the indexes are computed, you can find
it if you are persistant enough:))) - set it to 1 and you will get pre/post indexes
as short as a single char. This will potentially make insertion operations slower,
your database bigger (and potentially binarily incompatible with previous
database though i am not sure how they store the keys) - to be on the safe
side rebuild database from LDIF.
Searches for prefixes that do not exist still may take forever..who knows...
[mailto:owner-openldap-devel@OpenLDAP.org]On Behalf Of Andreas
I'm running an instance of openldap-2.0.27 and it seems that the
subinitial and subfinal indexes are not working.
All for searches correctly return the same 4 entries, but with
varying degrees of speed (the database contains about 170k entries):
# time ldapsearch cn="jose roberto silva" > /dev/null
# time ldapsearch cn="*jose roberto silva*" > /dev/null
cn is indexed as follows:
index cn eq,subinitial,subany,subfinal
I had "sub" earlier, same result.
Now, the following two searches take minutes to complete:
# time ldapsearch cn="*jose roberto silva" > /dev/null
# time ldapsearch cn="jose roberto silva*" > /dev/null
Seems there is a problem with the subinitial and subfinal indexes, any
hints? I *think* this also happens with openldap-2.1.21, but I'll try
again later just to be sure.