I want to search change log under "cn=changelog". I can search the result normally if the result entries were not a lot. But if there are a lot of entries in the result, the memory will be not enough. So, I want to page the result. How can I define the size limit? I also refered to https://bugster.forgerock.org/jira/si/jira.issueviews:issue-html/OPENDJ-1218/OPENDJ-1218.html. While, I wonder how to define a filter to support "changeNumber". And in my result, there is not this attribut "changeNumber". Why? Please help me how shoud I do? BTW, I am using OpenDJ 3.0.
Asked
Active
Viewed 183 times
0
-
final SearchRequest request = Requests.newSearchRequest( "cn=changelog", SearchScope.WHOLE_SUBTREE, "(objectClass=*)", attributes) .addControl(ExternalChangelogRequestControl.newControl(cookie)); final LdapAsyncSearchHandler resultHandler = new LdapAsyncSearchHandler(); final Result result = connection.search(request, resultHandler); List
ldapEntryResult = resultHandler.getResultEntries(); – Long Cui May 24 '17 at 05:37 -
I'm using opendj-sdk. Filter is "(objectClass=*)". And I implemented ExternalChangelogRequestControl imitating other controls. – Long Cui May 24 '17 at 05:57
1 Answers
0
Size limit is an option of the client call. You can always specify the maximum amount of entries you want to be returned (the server has it's own limit and will enforce the smallest between the 2). How to define the size limit depends on what you are using as client, and you did not mention it.
Can you provide details on what you are using to search (tool, library...) and what is the filter and options you are currently using ? It's difficult to provide help and suggestions to improvement when there is no detail.

Ludovic Poitou
- 4,788
- 2
- 21
- 30
-
If you are using opendj client sdk, the SearchRequest.setSizeLimit() might be what you are looking for. – Feng Xi May 20 '17 at 00:23