This commit is contained in:
leif stawnyczy 2023-11-27 11:27:32 -05:00
parent 0efbf32577
commit 646bcef582

View File

@ -257,8 +257,8 @@ public class PersistedJpaBundleProvider implements IBundleProvider {
// we request 1 more resource than we need // we request 1 more resource than we need
// this is so we can be sure of when we hit the last page // this is so we can be sure of when we hit the last page
// (when doing offset searches) // (when doing offset searches)
final List<JpaPid> pidsSubList = final List<JpaPid> pidsSubList = mySearchCoordinatorSvc.getResources(
mySearchCoordinatorSvc.getResources(myUuid, theFromIndex, theToIndex + 1, myRequest, requestPartitionId); myUuid, theFromIndex, theToIndex + 1, myRequest, requestPartitionId);
// max list size should be either the entire list, or from - to length // max list size should be either the entire list, or from - to length
int maxSize = Math.min(theToIndex - theFromIndex, pidsSubList.size()); int maxSize = Math.min(theToIndex - theFromIndex, pidsSubList.size());
theResponsePageBuilder.setTotalRequestedResourcesFetched(pidsSubList.size()); theResponsePageBuilder.setTotalRequestedResourcesFetched(pidsSubList.size());