openldap/doc/man/man5/slapo-valsort.5

98 lines
2.9 KiB
Groff
Raw Normal View History

2005-08-23 18:44:36 +08:00
.TH SLAPO-VALSORT 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2014-01-25 21:21:25 +08:00
.\" Copyright 2005-2014 The OpenLDAP Foundation All Rights Reserved.
2005-08-23 18:44:36 +08:00
.\" Copying restrictions apply. See COPYRIGHT/LICENSE.
.\" $OpenLDAP$
.SH NAME
2009-06-03 08:43:44 +08:00
slapo\-valsort \- Value Sorting overlay to slapd
2005-08-23 18:44:36 +08:00
.SH SYNOPSIS
ETCDIR/slapd.conf
.SH DESCRIPTION
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 response.
.LP
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
2005-09-02 14:44:33 +08:00
is specified by prepending an integer weight {<\fIweight\fP>}
2005-08-23 18:44:36 +08:00
in front of each value of the attribute for which weighted sorting is
2013-02-12 05:50:02 +08:00
desired. This weighting factor is stripped off and not returned in search
results unless the valsort control is specified (1.3.6.1.4.1.4203.666.5.14).
2005-08-23 18:44:36 +08:00
The valsort control requires a value consisting of a Sequence that contains
a boolean flag. The weighting factor is only returned if the boolean value is TRUE. In
.BR lber-encode (3)
format, the required value must conform to "{b}" syntax.
2005-08-23 18:44:36 +08:00
.SH CONFIGURATION
These
2005-09-02 14:44:33 +08:00
.I slapd.conf
2005-08-23 18:44:36 +08:00
options apply to the Value Sorting overlay.
They should appear after the
.B overlay
directive.
.TP
2009-06-03 08:43:44 +08:00
valsort\-attr <\fIattribute\fP> <\fIbaseDN\fP> (<\fIsort-method\fP> | weighted [<\fIsort-method\fP>])
2005-08-23 18:44:36 +08:00
Configure a sorting method for the specified
2005-09-02 14:44:33 +08:00
.I attribute
2005-08-23 18:44:36 +08:00
in the subtree rooted at
2005-09-02 14:44:33 +08:00
.IR baseDN .
2005-08-23 18:44:36 +08:00
The
2005-09-02 14:44:33 +08:00
.I sort-method
2005-08-23 18:44:36 +08:00
may be one of
2009-06-03 08:43:44 +08:00
.BR alpha\-ascend ,
.BR alpha\-descend ,
.BR numeric\-ascend ,
2005-08-23 18:44:36 +08:00
or
2009-06-03 08:43:44 +08:00
.BR numeric\-descend .
2005-08-23 18:44:36 +08:00
If the special
.B weighted
2005-09-02 14:44:33 +08:00
method is specified, a secondary
.I sort-method
may also be specified. It is an
error to specify an alphanumeric
.I sort-method
for an attribute with Integer
or NumericString syntax, and it is an error to specify a numeric
.I sort-method
for an attribute with a syntax other than Integer or NumericString.
2005-08-23 18:44:36 +08:00
.SH EXAMPLES
.LP
.nf
database mdb
2005-08-23 18:44:36 +08:00
suffix dc=example,dc=com
...
overlay valsort
2009-06-03 08:43:44 +08:00
valsort\-attr member ou=groups,dc=example,dc=com alpha\-ascend
2005-08-23 18:44:36 +08:00
.fi
To invoke
.BR ldapsearch (1)
with the valsort control, the control value must be set appropriately.
The following octets represent the desired "{b}" encoding:
.LP
.nf
0x30 0x03 0x01 0x01 0xff
.fi
The control can be sent from the command-line using the base64
encoding of the value:
.LP
.nf
ldapsearch -E 1.3.6.1.4.1.4203.666.5.14=::MAMBAf8=
.fi
2005-08-23 18:44:36 +08:00
.SH FILES
.TP
2005-09-02 14:44:33 +08:00
\fIETCDIR/slapd.conf\fP
default \fBslapd\fP configuration file
2005-08-23 18:44:36 +08:00
.SH SEE ALSO
.BR slapd.conf (5),
.BR slapd\-config (5).
2005-08-23 18:44:36 +08:00
.SH ACKNOWLEDGEMENTS
.P
This module was written in 2005 by Howard Chu of Symas Corporation. The
work was sponsored by Stanford University.