ruby-net-ldap search result pagination

M

Mx MQP

Hi,

I'm new to ldap and I need to paginate the search result that it will
return.
Is there a control that needs to be set like in offset in DB?
Or does will paginate work with ruby-net-ldap?


Thanks.
 
D

Dominic Sisneros

[Note: parts of this message were removed to make it a legal post.]

I think ruby-net-ldap automatically already uses the paged search control
internally but uses this to populate the result returned. LDAP doesn't have
an offset for the paged result but instead returns a cookie, see
http://www.faqs.org/rfcs/rfc2696.html.

What ruby-net-ldap doesn't have that I wish it did was an implementation of
the server side sort control or the VLC control

http://blogs.sun.com/kanthi/entry/ldap_paged_results_more.
 
M

Maxxis MP

Dominic said:
I think ruby-net-ldap automatically already uses the paged search
control
internally but uses this to populate the result returned. LDAP doesn't
have
an offset for the paged result but instead returns a cookie, see
http://www.faqs.org/rfcs/rfc2696.html.

What ruby-net-ldap doesn't have that I wish it did was an implementation
of
the server side sort control or the VLC control

http://blogs.sun.com/kanthi/entry/ldap_paged_results_more.
Hello Dominic,

Thank you for your reply.
But I am sorry I don't understand how to set the control.
I already have my search code, but I don't understand how should I
incorporate the paged result returned by the server.
Code as follows:

result = ldap.search( :base => treebase, :filter => filter) do |entry|

debug "DN:#{entry.dn.inspect}"
end

Can you please give me more idea on where should I set the
"simplePageSize"
like in the sample below.

$ ./dsconfig -h localhost -p 1389 -D "cn=Directory Manager" -w password
set-access-control-
handler-prop \
--add global-aci:"(targetcontrol=\"1.2.840.113556.1.4.319\")(version
3.0; acl \"Allow Simple Paged
Results Access\"; allow(read) userdn =
\"ldap:///uid=admin,ou=people,dc=example,dc=com\";)" -n


Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top