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

Re: SLAP_INDEX_SUBSTR_ANY_LEN & co



Ah, before you go there, we have a patch I've been meaning to commit that makes all of
these lengths configurable in slapd.conf.


Hallvard B Furuseth wrote:

How do these slap.h constants work?  I take it IF_MINLEN means that
initial/final substrings of 2 chars or more are indexed, and ANY_LEN
means substrings of 4 chars or more are indexed.  But what do IF_MAXLEN
and ANY_STEP do, and how do these constants interact?

What i want is to index substrings of 3 or more chars, so I'll modify at
least ANY_LEN - but I don't know what else.  I suspect I asked before,
but buried the answer somewhere:-(

/* constants for initial/final substrings indices */
#ifndef SLAP_INDEX_SUBSTR_IF_MINLEN
# define SLAP_INDEX_SUBSTR_IF_MINLEN	2
#endif
#ifndef SLAP_INDEX_SUBSTR_IF_MAXLEN
# define SLAP_INDEX_SUBSTR_IF_MAXLEN	4
#endif

/* constants for any substrings indices */
#ifndef SLAP_INDEX_SUBSTR_ANY_LEN
# define SLAP_INDEX_SUBSTR_ANY_LEN	4
#endif
#ifndef SLAP_INDEX_SUBSTR_ANY_STEP
# define SLAP_INDEX_SUBSTR_ANY_STEP	2
#endif





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