Returning sorted sets
nick at brainstorm.co.uk
nick at brainstorm.co.uk
Fri Aug 3 17:57:45 CEST 2001
thanks for the anwer. i 'm using openldap (not sure if this has server
side sorting), but if it does, it may be worth me looking into the jndi
before using caching. boo hiss ;-)
nick
Michael Ströder wrote:
>
> nick at Brainstorm.co.uk wrote:
> >
> > Ideally, I want my search interface to return just 20 records at a time,
> > which are a sorted subset of a larger result set. Does the LDAP
> > protocol allow this?
>
> The right solution would require deploying two LDAP extended
> controls:
> - paged results (OID 1.2.840.113556.1.4.319, see RFC2696)
> - Server Side Sorting of Search Results
> (OID 1.2.840.113556.1.4.473, see RFC2891)
>
> But unfortunately
> 1. with python-ldap you can't currently make use of extended
> controls and
> 2. the server has to support both controls (which you can
> check by looking at attribute supportedControl of its
> RootDSE).
>
> > I'm trying to think how else to do a multiple-page
> > search interface, ala current search engines with the footer
>
> Well, you could retrieve all search results, sort them on the client
> side and cache it for the next page hits. But take care of security
> considerations!
>
> My web2ldap cheats: It simply invokes a async search and retrieves
> the search results for the currently viewed page without doing any
> sorting. I considered the user to give up looking through the search
> results on the first page anyway. ;-)
>
> Ciao, Michael.
--
Nick Bower, Intranet Developer
nick at brainstorm.co.uk
Brainstorm
388 - 396 Oxford St
London W1N 9EH
United Kingdom
Tel 020 7074 7000
Mob 0790 5405 443
Fax 020 7074 7070
http://www.brainstorm.co.uk
More information about the python-ldap
mailing list