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

Re: Some openldap fixes... (fwd) (fwd)



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>))          

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)