Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby-net-ldap search result pagination

Reply
Thread Tools

ruby-net-ldap search result pagination

 
 
Mx MQP
Guest
Posts: n/a
 
      08-18-2009
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.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Dominic Sisneros
Guest
Posts: n/a
 
      08-18-2009
[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/ld...d_results_more.





On Tue, Aug 18, 2009 at 12:10 AM, Mx MQP <(E-Mail Removed)
> wrote:


> 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.
> --
> Posted via http://www.ruby-forum.com/.
>
>


 
Reply With Quote
 
 
 
 
Maxxis MP
Guest
Posts: n/a
 
      08-26-2009
Dominic Sisneros wrote:
> 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/ld...d_results_more.
>
>
>
>
>
> On Tue, Aug 18, 2009 at 12:10 AM, Mx MQP


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\")(ve rsion
3.0; acl \"Allow Simple Paged
Results Access\"; allow(read) userdn =
\"ldap:///uid=admin,ou=people,dc=example,dc=com\"" -n


Thanks.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
simulation result is correct but synthesis result is not correct J.Ram VHDL 7 12-03-2008 01:26 PM
GridView, pagination and search engine optimization danc ASP .Net Web Controls 0 05-31-2006 08:41 PM
1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds Michael Tan Ruby 32 07-21-2005 03:23 PM
Pagination function for search page returning too many hits to display on one page. Henrik ASP .Net 1 06-02-2005 01:17 PM
Google search result like site search!! How? =?Utf-8?B?TGFrc2htaSBOYXJheWFuYW4uUg==?= ASP .Net 3 05-06-2005 02:08 AM



Advertisments