- 论坛徽章:
- 0
|
ldap的“搜索返回条目书限制“包括两个方面:服务器端,客户端。
服务器端限制:
对于Tivoli Directory来说,就是通过ibm-slapdSizeLimit参数是设置。
客户端限制:
对你们目前的问题而言就是以下语句中的默认Sizelimit是1000.
LDAPConnection lc = new LDAPConnection();
LDAPSearchResults lrs = lc.search("cn=users,dc=yourco,dc=com",LDAPConnection.SCOPE_SUB,"objectclass=*",null,true);
参考以下 novell文档,其中有具体描述.
=================================================
1.http://developer.novell.com/docu ... LDAPConnection.html
LDAPSearchResults search(java.lang.String base, int scope, java.lang.String filter, java.lang.String[] attrs, boolean typesOnly, LDAPSearchConstraints cons)
Synchronously performs the search specified by the parameters, using the specified search constraints (such as the maximum number of entries to find or the maximum time to wait for search results).
=================================================
2.http://developer.novell.com/docu ... .html#getMaxResults()
getMaxResults
public int getMaxResults()Returns the maximum number of search results to be returned for a search operation. A value of 0 means no limit. Default: 1000 The search operation will be terminated with an LDAPException.SIZE_LIMIT_EXCEEDED if the number of results exceed the maximum.
Returns:
The value for the maximum number of results to return.
See Also:
setMaxResults(int), LDAPException.SIZE_LIMIT_EXCEEDED
=================================================
所以,你可以尝试加入此句.
LDAPConnection lc = new LDAPConnection();
lc.setMaxResults(100000); //
LDAPSearchResults lrs = lc.search("cn=users,dc=yourco,dc=com",LDAPConnection.SCOPE_SUB,"objectclass=*",null,true); |
|