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

Re: postalAddress index? and recommendation



Today at 10:02am, Daniel Henninger wrote:

> Is there a restriction on searching on postalAddress?  I assume no since
> the schema file indicates that it does cased ignored List type matches.

Yes, there is a severe restriction... "caseIgnoreListSubstringsMatch"
and "caseIgnoreListMatch" are NOT implemented in openLDAP (yet)... I
have personally gotten around this by using the attached patch (against
the 2.1 code -- I haven't even begun to play with the 2.2 code yet) as a
kludge that uses the caseIgnoreMatch and caseExactIgnoreSubstringsMatch
routines for caseIgnoreListMatch and caseIgnoreListSubstringsMatch,
respectively.

-- 
Frank Swasey                    | http://www.uvm.edu/~fcs
Systems Programmer              | Always remember: You are UNIQUE,
University of Vermont           |    just like everyone else.
        === God bless all inhabitants of your planet ===
--- servers/slapd/schema_init.c.orig	2003-06-13 13:07:00.000000000 -0400
+++ servers/slapd/schema_init.c	2003-10-01 11:45:38.000000000 -0400
@@ -60,9 +60,11 @@
 #define caseExactOrderingMatch			caseExactMatch
 #define integerOrderingMatch			integerMatch
 
+/* KLUDGE done by UVM for operational purposes */
+#define caseIgnoreListMatch			caseIgnoreMatch
+#define caseIgnoreListSubstringsMatch		caseExactIgnoreSubstringsMatch
+
 /* unimplemented matching routines */
-#define caseIgnoreListMatch				NULL
-#define caseIgnoreListSubstringsMatch	NULL
 #define protocolInformationMatch		NULL
 
 #ifdef SLAPD_ACI_ENABLED
@@ -4639,14 +4641,18 @@
 		"SYNTAX 1.3.6.1.4.1.1466.115.121.1.41 )",
 		SLAP_MR_EQUALITY | SLAP_MR_EXT | SLAP_MR_DN_FOLD, NULL,
 		NULL, NULL,
-		caseIgnoreListMatch, NULL, NULL,
+		caseIgnoreListMatch,
+		caseExactIgnoreIndexer,
+		caseExactIgnoreFilter,
 		NULL},
 
 	{"( 2.5.13.12 NAME 'caseIgnoreListSubstringsMatch' "
 		"SYNTAX 1.3.6.1.4.1.1466.115.121.1.58 )",
 		SLAP_MR_SUBSTR, NULL,
 		NULL, NULL,
-		caseIgnoreListSubstringsMatch, NULL, NULL,
+		caseIgnoreListSubstringsMatch,
+		caseExactIgnoreSubstringsIndexer,
+		caseExactIgnoreSubstringsFilter,
 		NULL},
 
 	{"( 2.5.13.13 NAME 'booleanMatch' "