title: LDAP: How to return more than 1000 results (java)
body: <p>I am using the LDAP SDK from this site: <a href="https://www.unboundid.com/products/ldap-sdk/">https://www.unboundid.com/products/ldap-sdk/</a> .
  I would like to make a search operation which returns a lot of entries.</p>
  
  <p>According to the FAQ's site, ( <a href="https://www.unboundid.com/products/ldap-sdk/docs/ldapsdk-faq.php#search">https://www.unboundid.com/products/ldap-sdk/docs/ldapsdk-faq.php#search</a> ) I have to use a SearchResultListener implementation.</p>
  
  <p>So here is what I did:</p>
  
  <pre><code> public class UpdateThread extends Thread implements SearchResultListener {
   ...
   // create request
   final SearchRequest request = new SearchRequest(this, instance.getBaseDN(),SearchScope.SUB, filter);
   // Setting size limit of results.
   request.setSizeLimit(2000);
  
   ...
  
   // Get every result one by one.
   @Override
  public void searchEntryReturned(SearchResultEntry arg0) {
      System.out.println("entry "+arg0.getDN());
  
  }
  </code></pre>
  
  <p>The problem is that "searchEntryReturned" returns a maximum of 1000 results. Even if I set the size limit to "2000".</p>