ruby-net-ldap search result pagination

Discussion in 'Ruby' started by Mx MQP, Aug 18, 2009.

  1. Mx MQP

    Mx MQP Guest

    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/.
    Mx MQP, Aug 18, 2009
    #1
    1. Advertising

  2. [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.





    On Tue, Aug 18, 2009 at 12:10 AM, Mx MQP <
    > 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/.
    >
    >
    Dominic Sisneros, Aug 18, 2009
    #2
    1. Advertising

  3. Mx MQP

    Maxxis MP Guest

    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/ldap_paged_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\")(version
    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/.
    Maxxis MP, Aug 26, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Henrik
    Replies:
    1
    Views:
    538
    Phillip Ian
    Jun 2, 2005
  2. James

    ldap search result size..

    James, Sep 19, 2003, in forum: Java
    Replies:
    0
    Views:
    375
    James
    Sep 19, 2003
  3. Michael Tan
    Replies:
    32
    Views:
    927
    Ara.T.Howard
    Jul 21, 2005
  4. Replies:
    1
    Views:
    193
    Austin Ziegler
    Oct 11, 2006
  5. dacat

    Net::LDAP vs ruby/ldap

    dacat, Apr 27, 2007, in forum: Ruby
    Replies:
    3
    Views:
    283
    Ian Macdonald
    May 18, 2007
Loading...

Share This Page