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

Re: [?] Filter Question


On Wednesday 01 October 2003 16:55, Walter Vendraminetto wrote:
> Does anyone knows why it happens that when I issue the command:
> ldapsearch -x "(&(uidNumber>=1000)(uidNUmber<2000))"
> no entry is returned, the ret code is 0 (Success) and in the log occur:
> ----------------------------------------------------------------------
> conn=0 fd=12 ACCEPT from IP= (IP=
> conn=0 op=0 BIND dn="" method=128
> deferring operation
> conn=0 op=0 RESULT tag=97 err=0 text=
> conn=0 op=1 SRCH base="dc=univr,dc=it" scope=2
> filter="(&(?=undefined)(?=undefined))"
> conn=0 op=2 UNBIND
> conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=0 text=
> conn=0 fd=12 closed
> ------------------------------------------------------------------------

if you haven't modified the schema for uidNumber, there is no ORDERING
matching rule in the definition of the uidNumber attribute.
Thus the <= and >= filter operators will not work.

In addition to that the operator < is not allowed in LDAP.
To achieve the same result as the illegal (x<y) you can either write
(&(x<=y)(!(x=y))) or precalculate z=y-1 and then write (x<=z) 


Peter Marschall
eMail: peter@adpm.de