You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2013/02/22 17:13:59 UTC
(ObjectClass=*) node in filter can be removed
Hi guys,
as I was playing around the idea of moving the scope index at the end of
the filter, nstead of the beginning, I just got some failures when
running the tests. For instance, a test that searcj for every entries
under ou=system, SUBTREE, with a filter like (ObjectClass=*), it returns 0.
Why ?
Very simple : as every entry has an ObjectClass, we don't store the list
of entries assoiated to the ObjectClass value in the presence index. The
direct consequence is that evaluating (&(scope=Subtree)(OjectClass=*))
wil return everything using the scope index, when
(&(OjectClass=*)(scope=Subtree)) will return nothing as the presence
index will be used (and it does not contain ObjectClass).
At this point, I realized that we will always use the scope except for a
OneLevel scope, and the number of candidates the scope will find will
always be equal to the candidates matched by (ObjectClass=*).
We then can get rid of the (ObjectClass=*) node in the filter,
irrespective to the complexity of this filter.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com
Re: (ObjectClass=*) node in filter can be removed
Posted by Kiran Ayyagari <ka...@apache.org>.
On Fri, Feb 22, 2013 at 11:09 PM, Kiran Ayyagari <ka...@apache.org>wrote:
>
>
> On Fri, Feb 22, 2013 at 9:43 PM, Emmanuel Lécharny <el...@gmail.com>wrote:
>
>> Hi guys,
>>
>> as I was playing around the idea of moving the scope index at the end of
>> the filter, nstead of the beginning, I just got some failures when
>> running the tests. For instance, a test that searcj for every entries
>> under ou=system, SUBTREE, with a filter like (ObjectClass=*), it returns
>> 0.
>>
>> Why ?
>>
>> Very simple : as every entry has an ObjectClass, we don't store the list
>> of entries assoiated to the ObjectClass value in the presence index. The
>> direct consequence is that evaluating (&(scope=Subtree)(OjectClass=*))
>> wil return everything using the scope index, when
>> (&(OjectClass=*)(scope=Subtree)) will return nothing as the presence
>> index will be used (and it does not contain ObjectClass).
>>
>> At this point, I realized that we will always use the scope except for a
>> OneLevel scope, and the number of candidates the scope will find will
>> always be equal to the candidates matched by (ObjectClass=*).
>>
>> We then can get rid of the (ObjectClass=*) node in the filter,
>> irrespective to the complexity of this filter.
>>
>> (replying just for the sake of documenting the conversation happened on
> IM)
> this looks like a regression cause we never actually keep this
> (objectClass=*) node, we drop it before evaluating the filter
> further
>
> I was wrong, we are keeping this node dropping rest of the nodes in
certain cases like
(&(objectClass=person)(objectClass=*)) here clearly we can drop the first
node from the filter
> --
>> Regards,
>> Cordialement,
>> Emmanuel Lécharny
>> www.iktek.com
>>
>>
>
>
> --
> Kiran Ayyagari
> http://keydap.com
--
Kiran Ayyagari
http://keydap.com
Re: (ObjectClass=*) node in filter can be removed
Posted by Kiran Ayyagari <ka...@apache.org>.
On Fri, Feb 22, 2013 at 9:43 PM, Emmanuel Lécharny <el...@gmail.com>wrote:
> Hi guys,
>
> as I was playing around the idea of moving the scope index at the end of
> the filter, nstead of the beginning, I just got some failures when
> running the tests. For instance, a test that searcj for every entries
> under ou=system, SUBTREE, with a filter like (ObjectClass=*), it returns 0.
>
> Why ?
>
> Very simple : as every entry has an ObjectClass, we don't store the list
> of entries assoiated to the ObjectClass value in the presence index. The
> direct consequence is that evaluating (&(scope=Subtree)(OjectClass=*))
> wil return everything using the scope index, when
> (&(OjectClass=*)(scope=Subtree)) will return nothing as the presence
> index will be used (and it does not contain ObjectClass).
>
> At this point, I realized that we will always use the scope except for a
> OneLevel scope, and the number of candidates the scope will find will
> always be equal to the candidates matched by (ObjectClass=*).
>
> We then can get rid of the (ObjectClass=*) node in the filter,
> irrespective to the complexity of this filter.
>
> (replying just for the sake of documenting the conversation happened on
IM)
this looks like a regression cause we never actually keep this
(objectClass=*) node, we drop it before evaluating the filter
further
--
> Regards,
> Cordialement,
> Emmanuel Lécharny
> www.iktek.com
>
>
--
Kiran Ayyagari
http://keydap.com