mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
[SEARCH-799] Modified resultMapper in order to always take numberfound from resulset. (#139)
This commit is contained in:
@@ -195,19 +195,10 @@ public class ResultMapper
|
||||
{
|
||||
//We used Solr for this query
|
||||
context = toSearchContext(solrResultSet, searchRequestContext, searchQuery, notFound);
|
||||
total = setTotal(solrResultSet);
|
||||
}
|
||||
else
|
||||
{
|
||||
//This probably wasn't solr
|
||||
if (!results.hasMore())
|
||||
{
|
||||
//If there are no more results then we are confident that the number found is correct
|
||||
//otherwise we are not confident enough that its accurate
|
||||
total = setTotal(results);
|
||||
}
|
||||
}
|
||||
|
||||
total = setTotal(results);
|
||||
|
||||
return CollectionWithPagingInfo.asPaged(params.getPaging(), noderesults, results.hasMore(), total, null, context);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user