Python-ldap搜索:超出大小限制 [英] Python-ldap search: Size Limit Exceeded

查看:376
本文介绍了Python-ldap搜索:超出大小限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用python-ldap库连接到我们的LDAP服务器并运行查询.我遇到的问题是,尽管在搜索中设置了大小限制,但在任何会返回太多结果的查询上,我仍然遇到SIZELIMIT_EXCEEDED错误.我知道查询本身正在工作,因为如果查询返回一小部分用户,我将得到结果.即使我将大小限制设置为荒谬的值(例如1),对于那些较大的查询,我仍然会得到SIZELIMIT_EXCEEDED.我在下面粘贴了我的查询的通用版本.关于我在这里做错什么的任何想法吗?

I'm using the python-ldap library to connect to our LDAP server and run queries. The issue I'm running into is that despite setting a size limit on the search, I keep getting SIZELIMIT_EXCEEDED errors on any query that would return too many results. I know that the query itself is working because I will get a result if the query returns a small subset of users. Even if I set the size limit to something absurd, like 1, I'll still get a SIZELIMIT_EXCEEDED on those bigger queries. I've pasted a generic version of my query below. Any ideas as to what I'm doing wrong here?

result = self.ldap.search_ext_s(self.base, self.scope, '(personFirstMiddle=<value>*)', sizelimit=5)

推荐答案

当LDAP客户端请求大小限制时,这称为客户端请求的"大小限制.客户端请求的大小限制不能覆盖服务器设置的大小限制.服务器可以为整个服务器,特定授权身份或其他原因设置服务器的大小限制,无论哪种情况,客户端都不能覆盖服务器的大小限制.使用simple paged results控件或virtual list view控件可能必须分多个部分发出搜索请求.

When the LDAP client requests a size-limit, that is called a 'client-requested' size limit. A client-requested size limit cannot override the size-limit set by the server. The server may set a size-limit for the server as a whole, for a particular authorization identity, or for other reasons - whichever the case, the client may not override the server size limit. The search request may have to be issued in multiple parts using the simple paged results control or the virtual list view control.

这篇关于Python-ldap搜索:超出大小限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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