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

Re: inequality predicates



At 09:10 PM 7/14/00 -0500, Sudha K. wrote:
>  I tried using the inequality predicates (>=, <=) to search for some
>integer attributes using ldap_search. However, I wasnt successful in this
>and it appears that only the equality predicate is recognized. Can someone
>please provide some help on how I should define attribute types that allow
>inequality predicates while searching?

OpenLDAP 1.x only allows you define an attribute's syntax.  This
syntax implicitly implies matching rules for all assertions.  That is:

  attribute foo ces

defines foo to be a directory string with case sensitive equality,
ordering, and substrings match.

If you are using an LDAPv3 server, you likely need to explicitly
define the matching rules.  See RFC2252.

>Most of the numeric attribute types
>(like gidNumber)that are defined in the standard schema files seem to have
>only an EQUALITY predicate defined on them.

You mean RFC2307 (which is Informational, not Standard Track).

  attributetype ( 1.3.6.1.1.1.1.1 NAME 'gidNumber'
    DESC 'An integer uniquely identifying a group in an administrative domain'
    EQUALITY integerMatch
    SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )

This schema is defined in LDAPv3 terms.  And yes, the attribute does
not an ORDERING matching, so any >= or <= assertions are Undefined.
You may be able to do an ordering match via the extensible
matching rule assertion (See RFC2251).