Le 19/09/16 à 12:12, Doan Tin Nghia a écrit : > I could not obtain total entries in the search result. The 'size' value in > PageResults Control was always zero. Seems the API is not following RFC > 2696.
It does fllow teh RFC, which says : "the size MAY be set to the server's estimate of the total number of entries in the entire result set. Servers that cannot provide such an estimate MAY set this size to zero (0)." Estimating the number of results is not simple, if you want to have a performant server : you have to compute it beforehand, which is costly. ApacheDS don't compute the results if not needed (ie, it does not fetch every entry from the backend, check if they match the filters, remove all the attributes that are not requested, add all the computed attributes, etc. until it has to do it. Bottom line, and especially for the paged search control, where we can use a cursor that will stay in memory, that saves a LOT of CPU).
