-
Notifications
You must be signed in to change notification settings - Fork 452
Paging not working as documented #885
Comments
Please see #886. It looks to me like the
node-ldapjs/lib/client/client.js Lines 618 to 629 in a37daf1
|
Okay I see that. However, that still doesn't really answer how to get all the search results using paging. |
The test shows how to collect the results. If you want to reduce memory, then you'd use the node-ldapjs/lib/client/search_pager.js Lines 16 to 22 in a37daf1
|
Thank you for that! I was writing the code correctly, but I wasn't understanding my LDAP search properly. Rather than expect it to automatically page the large "memberOf" attribute of the single group that is returned, I need to run two searches. One to get the group data, and a second search to get the entire "memberOf" list for that group. In that case, the paging worked as expected. Thanks again! |
I am working with a large directory at my company (40000+ accounts). I have a group that has a very large number of members (10000+). I'm following the documented procedure (http://ldapjs.org/client.html) for paging.
I've wrapped the search function in a Promise for ease of use. Here's an excerpt from my function. If you don't see it defined, assume it's provided by the function:
When I execute the search for my group that has a memberOf field containing 10000+ members, I see the "page end" text print once and then I get a result containing a field called
member;range=0-1499
. First off, I set the pageSize to 500, not 1500. Second, I know for a fact that that there are more than 1500 group members. In the past, I used the manual method of adjusting the ldap calls to use that attribute, parse it, and walk it out until it came back with a '*' in the range, i.e.member;range=1500-2999
,member;range=3000-*
. This works but I had to write a custom recursive function to do it, and it's even more complicated when you have nested groups that you need to flatten into members who are users. Paging doesn't appear to do anything except tell you that there is a page.What am I missing?
The text was updated successfully, but these errors were encountered: