MNT-20775 : deleted-nodes with maxitems parameter take longer (#255)

* MNT-20775 : rest api /deleted-nodes with maxitems parameter take longer when there are more items in the trash can
  Based on offset and limit, returns only the required results from database
  Added count query for ArchivedNodes
This commit is contained in:
Alexandru-Eusebiu Epure
2021-01-27 17:15:34 +02:00
committed by GitHub
parent 3d0099d742
commit 14ca5bb726
3 changed files with 45 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ public abstract class AbstractCannedQuery<R> implements CannedQuery<R>
final List<List<R>> finalPages = pages;
// Has more items beyond requested pages ? ... ie. at least one more page (with at least one result)
final boolean hasMoreItems = (rawResults.size() > pagingDetails.getResultsRequiredForPaging());
final boolean hasMoreItems = (rawResults.size() > pagingDetails.getResultsRequiredForPaging()) || (totalCount.getFirst() > pagingDetails.getResultsRequiredForPaging());
results = new CannedQueryResults<R>()
{