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

Greater-equal/Less-than-equal comparisons



Tried to search the FAQ-o-Matic and list archives on this with no success.
Are the ">=" and "<=" filter comparisons known to work/not work in
OpenLDAP?  With an old Netscape LDAP server I can do

ldapsearch ... 'sn>=N' dn  [returns all dn's where surname begins with N-Z]
ldapsearch ... 'uidNumber<=100'  [dn (similar with integer-typed attr.]

but when I try these with OpenLDAP 2.0.27 (Red Hat 7.x stock RPM using 
GDBM storage) or OpenLDAP 2.1.21 (Solaris compile I did myself to use BDB) 
the filter returns no results:

ldapsearch ... 'sn=Nordquist' dn [returns my dn]
ldapsearch ... 'sn>=Nordquist' dn [returns nothing]

(and similar with the integer-typed attribute uidNumber).  I have this for 
indexing in slapd.conf on the Solaris server, for example:

index           default                 pres,eq
index           objectClass             eq
index           cn,sn,givenName         pres,eq,sub
...

Can't think of any other details on my setup to add, but happy to provide
more if necessary.  Pointers to a solution greatly appreciated!  Thanks.

-- 
Brent J. Nordquist <b-nordquist@bethel.edu> N0BJN
Other contact information: http://kepler.acns.bethel.edu/~bjn/contact.html
* Fast pipe * Always on * Get out of the way - Tim Bray http://tinyurl.com/7sti