Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E8BC9710 for ; Fri, 22 Feb 2013 17:39:32 +0000 (UTC) Received: (qmail 75915 invoked by uid 500); 22 Feb 2013 17:39:32 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 75871 invoked by uid 500); 22 Feb 2013 17:39:32 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 75862 invoked by uid 99); 22 Feb 2013 17:39:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2013 17:39:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.210.174 as permitted sender) Received: from [209.85.210.174] (HELO mail-ia0-f174.google.com) (209.85.210.174) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Feb 2013 17:39:27 +0000 Received: by mail-ia0-f174.google.com with SMTP id u20so756796iag.33 for ; Fri, 22 Feb 2013 09:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Qu8rO29Y8JPhL8CXkzrkn4Quxf5QuzOAMf2ZXE0skQI=; b=xMxLps074/dCIS2hbif8zF3EH+KcWsWJAOpHQP3aqrwcEG5dlZ45fnIXLVj8482uOi kO93Lt4WmYfeFYEtPS/xYoHcu6lbm/sF7Rl+sf0uxcUnNcieSiRTY6+xjuY+OOC54pzR YGwVQZ64p2S3ttUGfANPAcXEA2NLo9UX6lui91OINgSa17tiPr2RDQ8bJZYLboLVDxaZ s9ClOjwZ2C1TS2HdcFf+IA0Uf5033kf6gJpMkNmenNL6q0PCtSH+NhoqbWq6+SByzi9m ZxhKvWy3pdSREhCphGaEoCkEq6yPgJVD80lfLcakIfygjskEfsZfkpqWRrXcPswACPUK BJng== MIME-Version: 1.0 X-Received: by 10.42.189.199 with SMTP id df7mr1103829icb.16.1361554746819; Fri, 22 Feb 2013 09:39:06 -0800 (PST) Sender: ayyagarikiran@gmail.com Received: by 10.231.72.67 with HTTP; Fri, 22 Feb 2013 09:39:06 -0800 (PST) In-Reply-To: <51279947.4070509@gmail.com> References: <51279947.4070509@gmail.com> Date: Fri, 22 Feb 2013 23:09:06 +0530 X-Google-Sender-Auth: _7xZT1DGjK7guV44oPnJ5sqovjc Message-ID: Subject: Re: (ObjectClass=*) node in filter can be removed From: Kiran Ayyagari To: Apache Directory Developers List , elecharny@apache.org Content-Type: multipart/alternative; boundary=485b397dd0db06c5e904d653ab65 X-Virus-Checked: Checked by ClamAV on apache.org --485b397dd0db06c5e904d653ab65 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Fri, Feb 22, 2013 at 9:43 PM, Emmanuel L=E9charny w= rote: > 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=3Dsystem, SUBTREE, with a filter like (ObjectClass=3D*), it retu= rns 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=3DSubtree)(OjectClass=3D*)= ) > wil return everything using the scope index, when > (&(OjectClass=3D*)(scope=3DSubtree)) 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=3D*). > > We then can get rid of the (ObjectClass=3D*) 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=3D*) node, we drop it before evaluating the filter further -- > Regards, > Cordialement, > Emmanuel L=E9charny > www.iktek.com > > --=20 Kiran Ayyagari http://keydap.com --485b397dd0db06c5e904d653ab65 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Fri, Feb 22, 2013 at 9:43 PM, Emmanue= l L=E9charny <elecharny@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=3Dsystem, SUBTREE, with a filter like (ObjectClass=3D*), it return= s 0.

Why ?

Very simple : as every entry has an ObjectClass, we don't store the lis= t
of entries assoiated to the ObjectClass value in the presence index. The direct consequence is that evaluating (&(scope=3DSubtree)(OjectClass=3D= *))
wil return everything using the scope index, when
(&(OjectClass=3D*)(scope=3DSubtree)) will return nothing as the presenc= e
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=3D*).

We then can get rid of the (ObjectClass=3D*) node in the filter,
irrespective to the complexity of this filter.

(replying just for the sake of documenting the conversation happene= d on IM)
this looks like a regression cause we never actually keep this= (objectClass=3D*) node,=A0 we drop it before evaluating the filter
further

= --
Regards,
Cordialement,
Emmanuel L=E9charny
www.iktek.com




--
Kiran Ayy= agari
http://keydap.com<= /a> --485b397dd0db06c5e904d653ab65--