Go to main content

man pages section 5: File Formats

Exit Print View

Updated: Wednesday, February 9, 2022

slapo-valsort (5oldap)


slapo-valsort - Value Sorting overlay to slapd




SLAPO-VALSORT(5oldap)                                    SLAPO-VALSORT(5oldap)

       slapo-valsort - Value Sorting overlay to slapd


       The  Value  Sorting overlay can be used with a backend database to sort
       the values of specific multi-valued attributes within  a  subtree.  The
       sorting  occurs  whenever  the  attributes  are  returned  in  a search

       Sorting can be specified in ascending or descending order, using either
       numeric  or  alphanumeric sort methods. Additionally, a "weighted" sort
       can be  specified,  which  uses  a  numeric  weight  prepended  to  the
       attribute  values.   The weighted sort is always performed in ascending
       order, but may be combined with the other methods for values  that  all
       have  equal  weights.  The weight is specified by prepending an integer
       weight {<weight>} in front of each value of  the  attribute  for  which
       weighted  sorting is desired. This weighting factor is stripped off and
       not returned in search results unless the valsort control is  specified

       The valsort control requires a value consisting of a Sequence that con-
       tains a boolean flag. The weighting factor  is  only  returned  if  the
       boolean  value  is  TRUE.  In lber-encode(3) format, the required value
       must conform to "{b}" syntax.

       These slapd.conf options apply to  the  Value  Sorting  overlay.   They
       should appear after the overlay directive.

       valsort-attr  <attribute>  <baseDN>  (<sort-method>  | weighted [<sort-
              Configure a sorting method for the specified  attribute  in  the
              subtree  rooted  at  baseDN.   The  sort-method  may  be  one of
              alpha-ascend, alpha-descend, numeric-ascend, or numeric-descend.
              If  the  special weighted method is specified, a secondary sort-
              method may also be specified. It  is  an  error  to  specify  an
              alphanumeric sort-method for an attribute with Integer or Numer-
              icString syntax, and it is an error to specify a  numeric  sort-
              method  for  an  attribute  with  a syntax other than Integer or

            database bdb
            suffix dc=example,dc=com
            overlay valsort
            valsort-attr member ou=groups,dc=example,dc=com alpha-ascend

       To invoke ldapsearch(1) with the valsort  control,  the  control  value
       must  be set appropriately.  The following octets represent the desired
       "{b}" encoding:

            0x30 0x03 0x01 0x01 0xff

       The control can be sent from the command-line using the base64 encoding
       of the value:

            ldapsearch -E

              default slapd configuration file

       See attributes(7) for descriptions of the following attributes:

       |ATTRIBUTE TYPE |       ATTRIBUTE VALUE         |
       |Availability   | service/network/ldap/openldap |
       |Stability      | Pass-through uncommitted      |

       slapd.conf(5), slapd-config(5).

       This module was written in 2005 by Howard Chu of Symas Corporation. The
       work was sponsored by Stanford University.

       Source code for open source software components in Oracle  Solaris  can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-

       This    software    was    built    from    source     available     at
       https://github.com/oracle/solaris-userland.    The  original  community
       source was downloaded from   ftp://ftp.openldap.org/pub/OpenLDAP/openl-

       Further information about this software can be found on the open source
       community website at http://www.openldap.org/.

OpenLDAP 2.4.57                   2021/01/18             SLAPO-VALSORT(5oldap)