如何使用Python LDAP获得比服务器的大小限制更多的搜索结果? [英] How get get more search results than the server's sizelimit with Python LDAP?

查看:120
本文介绍了如何使用Python LDAP获得比服务器的大小限制更多的搜索结果?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 python LDAP 模块来(除其他事项外)搜索组,并且遇到服务器的大小限制并获得SIZELIMIT_EXCEEDED异常.我已经尝试了同步和异步搜索,并且都通过两种方式解决了这个问题.

I am using the python LDAP module to (amongst other things) search for groups, and am running into the server's size limit and getting a SIZELIMIT_EXCEEDED exception. I have tried both synchronous and asynchronous searches and hit the problem both ways.

您应该可以通过在搜索中设置分页控件来解决此问题,但是根据python-ldap docs,尚未为search_ext实现控件.有没有办法在Python中做到这一点?如果python-ldap库不支持它,是否还有另一个Python库支持?

You are supposed to be able to work round this by setting a paging control on the search, but according to the python-ldap docs controls are not implemented yet for search_ext. Is there a way to do this in Python? If the python-ldap library does not support it, is there another Python library that does?

推荐答案

以下是与python-ldap中的分页相关的一些链接.

Here are some links related to paging in python-ldap.

  • Documentation: http://www.python-ldap.org/doc/html/ldap-controls.html#ldap.controls.SimplePagedResultsControl
  • Example code using paging: http://www.novell.com/coolsolutions/tip/18274.html
  • More example code: http://google-apps-for-your-domain-ldap-sync.googlecode.com/svn/trunk/ldap_ctxt.py

这篇关于如何使用Python LDAP获得比服务器的大小限制更多的搜索结果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆