[Fedora-directory-commits] ldapserver/ldap/servers/slapd/back-ldbm back-ldbm.h, 1.19, 1.20
Noriko Hosoi
nhosoi at fedoraproject.org
Sat Dec 6 00:04:01 UTC 2008
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv28711
Modified Files:
back-ldbm.h
Log Message:
Resolves: #447353
Summary: RFE: search optimization and single character substring searches
(comment #20)
Description: update the comments to adjust to the program.
Index: back-ldbm.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/back-ldbm/back-ldbm.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- back-ldbm.h 24 Oct 2008 22:36:59 -0000 1.19
+++ back-ldbm.h 6 Dec 2008 00:03:59 -0000 1.20
@@ -362,24 +362,36 @@
typedef struct attrcrypt_private attrcrypt_private;
/*
- * Special attribute for an index entry
- * Usage: turn an index object to extensibleobject and
- * set an integer value for each
- * dn: cn=sn, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=config
- * objectClass: extensibleObject
- * nsSubStrBegin: 2
- * nsSubStrMiddle: 3
- * nsSubStrEnd: 2
- * [...]
+ * Special attributes for an index entry to change the substring index width.
+ * By default, substring index width is 3, i.e., search with the filter
+ * "(cn=abc*)" is an indexed search, but "(cn=ab*)" or "(cn=a*)" isn't.
+ * There is a big performance gap between the indexed search and the unindexed
+ * search especially when the database is large. To convert such unindexed
+ * search to the indexed search to speed up the query, these nsSubStr
+ * attributes are introduced.
+ *
+ * How to use the nsSubStr attributes:
+ * 1) turn the target index to extensibleobject by adding
+ * "objectClass: extensibleObject" to the index entry
+ * 2) set the length to each nsSubStr attribute of the index
+ * dn: cn=sn, cn=index, cn=userRoot, cn=ldbm database, cn=plugins, cn=config
+ * objectClass: extensibleObject
+ * nsSubStrBegin: 2
+ * nsSubStrMiddle: 3
+ * nsSubStrEnd: 2
+ * [...]
*
- * By default, the minimum key length triplets of substring index is 2, 3, 2.
- * The length is changed by setting this nsSubStrLen value.
+ * By default, the minimum key length triplets of substring index is 3, 3, 3.
+ * The length is changed by setting the triplets nsSubStrBegin, nsSubStrMiddle,
+ * nsSubStrEnd, respectively.
*
* Note: If any of the key length value is modified, the index file needs
* to be regenerated. Otherwise, the index file is going to have mixed
* key length.
* To change the key length,
- * 1) stop the server, 2) run db2index -t <attr>, 3) start the server.
+ * 1) stop the server,
+ * 2) run db2index -t <attr>,
+ * 3) start the server.
*/
#define INDEX_ATTR_SUBSTRBEGIN "nsSubStrBegin"
#define INDEX_ATTR_SUBSTRMIDDLE "nsSubStrMiddle"
More information about the Fedora-directory-commits
mailing list