From: Michael <mi...@st...> - 2001-08-02 16:21:39
|
Steve Jones wrote: > > I have just installed the Win32 version of Zope 2.4.0 and it ships with > Python 2.1. Your python-ldap module requires Python2.0 and apparently > won't work with python2.1. Any chance of making a python2.1 verion of > the ldap code available? Sorry, I just provide the ZIP file for download. I have no Win32 environment for building python-ldap. Maybe you can convince Mauro who did it or another person. Ciao, Michael. |
From: <ni...@Br...> - 2001-08-03 15:15:11
|
This one should really go in the FAQ for LDAP beginners like me :-) I've implemented an LDAP search interface, but as we know, results are returned unsorted. Python doesn't do too badly at this (although I can't help thinking it would be faster if underlying C routines did it). But sorting on the client side becomes problematic in a cgi which wants to show just 20 results at a time. 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? I'm trying to think how else to do a multiple-page search interface, ala current search engines with the footer [ 1 | 2 | 3 | 4 | next --> ] Any ideas? Cheers, nick PS - Thanks for a useful tool. Michael Str=F6der wrote: >=20 > Steve Jones wrote: > > > > I have just installed the Win32 version of Zope 2.4.0 and it ships wi= th > > Python 2.1. Your python-ldap module requires Python2.0 and apparentl= y > > won't work with python2.1. Any chance of making a python2.1 verion o= f > > the ldap code available? >=20 > Sorry, I just provide the ZIP file for download. I have no Win32 > environment for building python-ldap. Maybe you can convince Mauro > who did it or another person. >=20 > Ciao, Michael. >=20 > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > http://lists.sourceforge.net/lists/listinfo/python-ldap-dev --=20 Nick Bower, Intranet Developer ni...@br... 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 |
From: Michael <mi...@st...> - 2001-08-03 15:32:12
|
ni...@Br... 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. |
From: <ni...@br...> - 2001-08-03 16:03:37
|
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=F6der wrote: >=20 > ni...@Br... wrote: > > > > Ideally, I want my search interface to return just 20 records at a ti= me, > > which are a sorted subset of a larger result set. Does the LDAP > > protocol allow this? >=20 > 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) >=20 > 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). >=20 > > I'm trying to think how else to do a multiple-page > > search interface, ala current search engines with the footer >=20 > 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! >=20 > 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. ;-) >=20 > Ciao, Michael. --=20 Nick Bower, Intranet Developer ni...@br... 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 |
From: Michael <mi...@st...> - 2001-08-03 16:34:26
|
ni...@br... wrote: > > thanks for the anwer. i 'm using openldap (not sure if this has server > side sorting), My OpenLDAP does not announce it in supportedControl. You can check yourself with e.g. web2ldap: http://sites.inka.de:8002/web2ldap/ldapurl?ldap://ldap.openldap.org > but if it does, it may be worth me looking into the jndi > before using caching. boo hiss ;-) Boooooo! Maybe Jython? Ciao, Michael. |