Commit 98e79980 authored by Julio Sánchez Fernández's avatar Julio Sánchez Fernández
Browse files

Explain better what each matching rule function means.

We need to indexing routines per matching rule.  One (cindex) is used to
create the indexes.  The other (sindex) is used to search.  This is
necessary because the syntax of the value assertion may be different
from the syntax of the attributes the matching rules is used with.
They may be the same function, however, and will be the same in most
cases.
parent c2767c8a
...@@ -240,10 +240,20 @@ typedef struct slap_syntax { ...@@ -240,10 +240,20 @@ typedef struct slap_syntax {
#define ssyn_oid ssyn_syn.syn_oid #define ssyn_oid ssyn_syn.syn_oid
#define ssyn_desc ssyn_syn.syn_desc #define ssyn_desc ssyn_syn.syn_desc
/* Put a value in some normalized form */ /*
* Put an attribute value (NOT assertion value!) in some normalized
* form. We do not have normalization functions for the assertion
* values.
*/
typedef int slap_mr_normalize_func LDAP_P((struct berval * val, struct berval **normalized)); typedef int slap_mr_normalize_func LDAP_P((struct berval * val, struct berval **normalized));
/* Check if evals in entry match value in filter */ /*
* Check if evals in entry match value in filter, notice that the
* syntax of the fval needs not be the same as the syntax of the
* evals. Returns 1 if true, 0 if false, will someday return -1 if
* undefined.
*/
typedef int slap_mr_check_func LDAP_P(( typedef int slap_mr_check_func LDAP_P((
struct berval * fval, /* Value in filter ava */ struct berval * fval, /* Value in filter ava */
struct berval ** evals /* Values in entry */ struct berval ** evals /* Values in entry */
...@@ -255,7 +265,7 @@ typedef int slap_mr_skeys_func LDAP_P(( ...@@ -255,7 +265,7 @@ typedef int slap_mr_skeys_func LDAP_P((
struct berval *** svals /* Returned search keys */ struct berval *** svals /* Returned search keys */
)); ));
/* Find keys to use in searching the indexes */ /* Find keys to use in searching or creating the indexes */
typedef int slap_mr_index_func LDAP_P(( typedef int slap_mr_index_func LDAP_P((
struct berval ** svals, /* Values for search keys */ struct berval ** svals, /* Values for search keys */
struct berval *** ivals /* Returned values for indexes */ struct berval *** ivals /* Returned values for indexes */
...@@ -267,7 +277,8 @@ typedef struct slap_matching_rule { ...@@ -267,7 +277,8 @@ typedef struct slap_matching_rule {
slap_mr_normalize_func *smr_normalize; slap_mr_normalize_func *smr_normalize;
slap_mr_check_func *smr_compare; slap_mr_check_func *smr_compare;
slap_mr_skeys_func *smr_skeys; slap_mr_skeys_func *smr_skeys;
slap_mr_index_func *smr_index; slap_mr_index_func *smr_sindex;
slap_mr_index_func *smr_cindex;
Syntax *smr_syntax; Syntax *smr_syntax;
struct slap_matching_rule *smr_next; struct slap_matching_rule *smr_next;
} MatchingRule; } MatchingRule;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment