You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Dave Bothwell <db...@eprimepoint.com> on 2007/02/08 00:53:40 UTC

Search filter bug and question

Hello directory developers,

I have recently completed a custom partition, which I developed in 
version 0.9.3 and ported to version 1.0.0. I believe I have uncovered a 
bug (1) and, I also have a separate question (2) both are in regards to 
filters. First the bug:

(1)

Using JXplorer I entered a filter in the search dialog:

(|(&(!(sn=*ton*))(cn=*b*))(uid>=a))

when the filter was received at myCustomPartition’s search function it read

(| (! (sn=*ton*) ) (cn=*b*) (0.9.2342.19200300.100.1.1>=a) )

I believe it should read:

(| (& (! (sn=*ton*) ) (cn=*b*) ) (0.9.2342.19200300.100.1.1>=a) )

It appears the AND operator and associated parentheses are being 
stripped away.

(2)

My question has to do with the filter statement:

(| (objectClass=groupOfNames)[0] (objectClass=groupOfUniqueNames)[0] )[0]

I have not been able to hunt down information about the [0] syntax, 
which appears to be new to version 1.0.0. If someone can enlighten me or 
perhaps point me in the direction of the appropriate RFC I would greatly 
appreciate it.

Also, I would like to thank Alex and the rest of the team for all their 
hard work. It is a pleasure working with your product.

dbothwell@eprimepoint.net


Re: Search filter bug and question

Posted by Emmanuel Lecharny <el...@gmail.com>.
>
> >> (| (objectClass=groupOfNames)[0] (objectClass=groupOfUniqueNames)[0]
> )[0]
> >>
> > uh ? Where did you found this syntax? Isn't it possible that it's an
> > artifact you get from logs?
> >
> > AFAIK, those [0] are simply not allowed...
>
> These are scan counts from the optimizer which is inserted into the
> filter nodes.  The jdbm backend uses these to determine the best way to
> evaluate the filter on the entries in the partition.


Ahhhh.... This is a toString() which expose this information ! I though you
were  talking about the filter syntax as expressed is RFC 2254.

Ok, this is a debug information as explained by Alex :)



Cheers,
> Alex
>
>


-- 
Cordialement,
Emmanuel Lécharny
www.iktek.com

Re: Search filter bug and question

Posted by Alex Karasulu <ak...@apache.org>.
Emmanuel Lecharny wrote:
> Dave Bothwell a écrit :
> 

...

>>
>> It appears the AND operator and associated parentheses are being 
>> stripped away.
> 
> Good find ! But you are lucky :) It has been fixed last saturday ... 
> (https://issues.apache.org/jira/browse/DIRSERVER-823)
> What you can do is to get a nighty build or build the server from the 
> source. (nighty builds are *temporarily* available from 
> http://www.iktek.com/index.jsp?rubrique=ads)

Might want to switch to 1.0.1-SNAPSHOTs for now or wait for 1.0.1 to be 
released here in a few days thanks to Emmanuel's hard work.

>> (2)
>>
>> My question has to do with the filter statement:
>>
>> (| (objectClass=groupOfNames)[0] (objectClass=groupOfUniqueNames)[0] )[0]
>>
>> I have not been able to hunt down information about the [0] syntax, 
>> which appears to be new to version 1.0.0. If someone can enlighten me 
>> or perhaps point me in the direction of the appropriate RFC I would 
>> greatly appreciate it.
> 
> uh ? Where did you found this syntax? Isn't it possible that it's an 
> artifact you get from logs?
> 
> AFAIK, those [0] are simply not allowed...

These are scan counts from the optimizer which is inserted into the 
filter nodes.  The jdbm backend uses these to determine the best way to 
evaluate the filter on the entries in the partition.

Cheers,
Alex

Re: Search filter bug and question

Posted by Emmanuel Lecharny <el...@gmail.com>.
Dave Bothwell a écrit :

> Hello directory developers,

Hi Dave !

>
> I have recently completed a custom partition, which I developed in 
> version 0.9.3 and ported to version 1.0.0. I believe I have uncovered 
> a bug (1) and, I also have a separate question (2) both are in regards 
> to filters. First the bug:
>
> (1)
>
> Using JXplorer I entered a filter in the search dialog:
>
> (|(&(!(sn=*ton*))(cn=*b*))(uid>=a))
>
> when the filter was received at myCustomPartition’s search function it 
> read
>
> (| (! (sn=*ton*) ) (cn=*b*) (0.9.2342.19200300.100.1.1>=a) )
>
> I believe it should read:
>
> (| (& (! (sn=*ton*) ) (cn=*b*) ) (0.9.2342.19200300.100.1.1>=a) )
>
> It appears the AND operator and associated parentheses are being 
> stripped away.

Good find ! But you are lucky :) It has been fixed last saturday ... 
(https://issues.apache.org/jira/browse/DIRSERVER-823)
What you can do is to get a nighty build or build the server from the 
source. (nighty builds are *temporarily* available from 
http://www.iktek.com/index.jsp?rubrique=ads)

>
> (2)
>
> My question has to do with the filter statement:
>
> (| (objectClass=groupOfNames)[0] (objectClass=groupOfUniqueNames)[0] )[0]
>
> I have not been able to hunt down information about the [0] syntax, 
> which appears to be new to version 1.0.0. If someone can enlighten me 
> or perhaps point me in the direction of the appropriate RFC I would 
> greatly appreciate it.

uh ? Where did you found this syntax? Isn't it possible that it's an 
artifact you get from logs?

AFAIK, those [0] are simply not allowed...

>
> Also, I would like to thank Alex and the rest of the team for all 
> their hard work. It is a pleasure working with your product.

Well, the pleasure is ours ! That's good to know that people out there 
are using ADS, and even if it put pressure on our shoulders, it's always 
good news to have happy users :)

FYI, a 1.0.1 version is coming out very soon (two weeks ?). Many bugs 
will be fixed, included your bug number (1).

Tanks a lot !

>
> dbothwell@eprimepoint.net

Emmanuel

PS: We will be very interested to get your testimony about using ADS 
(what is it good for, which kind of problem you went through, which kind 
of solution it solved, such like that :)

>
>