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

Re: short filter search



Jon Roberts wrote:

Jon Roberts wrote:

As I recall, OpenLDAP is configured by default to limit search filters to at least 3 significant characters. For example, by default the filter

(myattribute=ab*)

would hang for a *long* time. I have been unable to find the prior message that explains what needs to be done to change this before building OpenLDAP. Could somebody please point to what code I should change before compiling if I want to reduce this threshold to say 2?


I found the thread:

http://www.openldap.org/lists/openldap-software/200405/msg00022.html

so to answer my own question, I should change nothing because initial and final substrings index minimum key length is 2. However, for (*ab*), the substring index key length is set in servers/slapd/slap.h. Sorry to be a bother, but if this isn't it

#define SLAP_INDEX_SUBSTR_MAXLEN    4

could somebody set me straight? I'll give it a go, otherwise.

You might want to have a look at this ITS http://www.openldap.org/its/index.cgi/Contrib?id=2661

A version of this feature is now in OpenLDAP 2.3.

Also
http://www.openldap.org/its/index.cgi/Software%20Enhancements?id=2588
Filtering now works better for filters using longer subinitial and subfinal filter strings as well.


The slapd.conf(5) manpage in OpenLDAP 2.3 has of course been updated to describe the new substring index configuration options.

--
 -- Howard Chu
 Chief Architect, Symas Corp.       Director, Highland Sun
 http://www.symas.com               http://highlandsun.com/hyc
 Symas: Premier OpenSource Development and Support