000018813 - Search limits using RSA ClearTrust API

Document created by RSA Customer Support Employee on Jun 16, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000018813
Applies ToRSA ClearTrust 5.0.1 Administrative Java API
RSA ClearTrust 5.5.1 Administrative Java API
RSA ClearTrust 5.5.2 Administrative Java API
IssueSearch limits using RSA ClearTrust API
Only a maximum of 1000 results are returned regardless of how many results should exist
CauseBy default, the Entitlements server throttles the number of records queried from a datastore to 1000 records. This is to legislate the volume of data queried to a manageable size to maintain overall system performance and throughput.
ResolutionThe JavaDoc documentation for the search method suggests the following:

    IAPIObject[] obj = sparseData.getByRange(0,Integer.MAX_VALUE);
    int returnedObjects = obj.length;

However, this actually is more restricted than the syntax suggests. In fact, the example would read as follows:

    IAPIObject[] obj = sparseData.getByRange(0,1000);
    int returnedObjects = obj.length;

This will now retrieve up to 1000 objects. The 1000 limit may be increased using an additional entry in the eserver.conf file. For example, to increase the value to 2000, do the following:


This approach must be used with caution, as inappropriate tuning may lead to implications in other parts of the overall system. Another approach is to use a series of queries to retrieve all the desired objects, for example:

    boolean moreEntries=true;
    int startVal=0;
    int maxRange=1000;
    IUserSearch userS = myServerProxy.searchUserObjects();
    ISparseData userISData = userS.search();
    while (moreEntries)
           int endVal=startVal+maxRange;
           Object[] userOb = userISData.getByRange(startVal,endVal);
           System.out.println("Number =" + userOb.length+ ", Start at "+startVal+", end at "+endVal);
           if (userOb.length==0) moreEntries=false;
           //TODO: Code to do the actual work on each object
Legacy Article IDa18678