Hi John,
You do not need to "enable" server side sorting, you just need to pass the control when doing the search. Note - server side sorting is very expensive and there is no way to "tune" it.
Anyway here is an example with ldapsearch:
-E "sss=<attr>:<optional OID>
$ ldapsearch -H ldap://localhost -D "cn=directory manager"-W -xLLL -b dc=example,dc=com -E "sss=cn"
The access log also verified that it worked:
[29/Oct/2025:13:23:58.547916898 -0400] conn=2735 fd=97 slot=97 connection from ::1 to ::1
[29/Oct/2025:13:23:58.548105777 -0400] conn=2735 op=0 BIND dn="cn=directory manager" method=128 version=3
[29/Oct/2025:13:23:58.601591049 -0400] conn=2735 op=0 RESULT err=0 tag=97 nentries=0 wtime=0.000046947 optime=0.053534485 etime=0.053580233 dn="cn=directory manager"
[29/Oct/2025:13:23:58.798674778 -0400] conn=2735 op=1 SRCH base="dc=example,dc=com" scope=2 filter="(objectClass=*)" attrs=ALL
[29/Oct/2025:13:23:58.798899510 -0400] conn=2735 op=1 SORT cn (2)
[29/Oct/2025:13:23:58.817638931 -0400] conn=2735 op=1 RESULT err=0 tag=101 nentries=2 wtime=0.000263183 optime=0.018964411 etime=0.019222933 notes=U details="Partially Unindexed Filter"
[29/Oct/2025:13:23:58.818044784 -0400] conn=2735 op=2 UNBIND
[29/Oct/2025:13:23:58.818061274 -0400] conn=2735 op=2 fd=97 Disconnect - Cleanly Closed Connection - U1
HTH,
Mark
Hi,
Is it as simple as indexing the attributes I want to sort on?
Thanks,
John A
-- Identity Management Development Team
No comments:
Post a Comment