[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Some openldap fixes... (fwd) (fwd)
I mistaken cut out a section from my previous post... this should
clarifiy...
At 03:58 PM 9/19/00 +0200, Marijn Meijles wrote:
>You wrote:
>> I for one would really like to see any changes that make
>> the ldbm backend faster and more reliable. Perhaps a more
>> detailed explanation of your scoping algoritm?
>>
>ok. peter made one:
>OpenLDAP 1.2 index method:
>
>relational table where:
> tablename: <attribute>
> key: <prefix><value>
> data: id-list of all elements that match:
> (<attribute>=<value>)
>
> algorithm: return idl from key( <prefix><value>)
>
>our method:
>
>relational table where:
> tablename: <attribute>
> key: <prefix><value>|reverse_string( <dn>)
> data: id-list of all elements that match:
> (<attribute>=<value>) && (<parent dn>=<dn>)
>
> algorithm:
> switch( scope) {
> case onelevel:
> return idl from key( <prefix><value>|string_reverse( <base dn>))
> break;
>
> case subtree:
> return merged idls from
> key( <prefix><value>|string_reversed( <base dn>*))
> // NOTE: due to the fact that B(+)trees have ordered keys
> // this is a linear key seq. starting on the key greater or
> // equal to the onelevel key. The iteration stops when the
> // keys don't start with the onelevel key anymore.
> break;
> }
How do you find the above key if the base isn't the parent?
That is, I have "uid=a,cn=b,cn=c,o=foo" (suffix of o=foo) and
I do a search -b "cn=c,o=foo" -s subtree "(uid=a)".
I do a lookup for:
<prefix>a|string_reverse(cn=c,o=foo)
but get zero keys returned as I only generated:
<prefix>a|string_reserve(cn=b,cn=c,o=foo)