Article View: fj.net.ldap
Article #69Re: openldap filters
From: toohey
Date: Mon, 13 Aug 2001 11:03
Date: Mon, 13 Aug 2001 11:03
57 lines
2663 bytes
2663 bytes
hi, '>=' and '<=' are defined in the ldap standards. FYI, '>' and '<' (greater than and less than) are not. Everything in a directory server is treated like a string. so IMHO it is the ASCII (or Unicode) values that are being compared. That could be a part of the reason. I've used Netscape DS and it works correctly as far as string comparision filters are concered (using >= ). HTH -toohey note: i've not used python. neither have i used openldap. Guenther Starnberger <gst@gst.priv.at> wrote in message news:<997618395.583484@newsmaster-04.atnet.at>... > hello, > > i have a problem using openldap 2.0 and filters (i'm not sure if its > openldap specific or not). > > i would like to create a user directory with a field storing the date when > the user was last contacted. (i'm going to use seconds since the begin of > the epoch because i think that's the easiest solution). > > i made a test schema with one integer field for the seconds, but when i try > to search for values greater or less than a specific value, ldap doesn't > return anything (no error, but only an empty list). > > my filter expression is: (myFoo>=8129) > > i tested it with python-ldap and a gnome directory browser called gq. > > the python code is: > res = l.search_s( > "ou=editors, o=sysfrog.org", > ldap.SCOPE_SUBTREE, > "(myFoo=8129)", > ) > > i have defined the attribute with: > attributetype ( 1.1.2.1.2 NAME 'myFoo' > DESC 'just a test' > SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 > SINGLE-VALUE ) > > does anybody know what's the reason for this behaviour. i'm new to ldap but > afaik it should be possible to search for "greater than" "less than" > expressions. > > thanks, > /gst
Technical Details
Message-ID:
<c82a2cc0.0108130303.77419019@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mailReferences:
<997618395.583484@newsmaster-04.atnet.at>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103627,bc9969c7ab3d302b X-Google-Attributes: gid103627,public X-Google-ArrivalTime: 2001-08-13 04:03:30 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: toohey_shroff@hotmail.com (toohey) Newsgroups: fj.net.ldap Subject: Re: openldap filters Date: 13 Aug 2001 04:03:30 -0700 Organization: http://groups.google.com/ Lines: 57 Message-ID: <c82a2cc0.0108130303.77419019@posting.google.com> References: <997618395.583484@newsmaster-04.atnet.at> NNTP-Posting-Host: 203.197.89.74 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 997700610 22465 127.0.0.1 (13 Aug 2001 11:03:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Aug 2001 11:03:30 GMT