directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <>
Subject (ObjectClass=*) node in filter can be removed
Date Fri, 22 Feb 2013 16:13:59 GMT
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.

Emmanuel L├ęcharny 

View raw message