mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-11319 Work around the fact that Filtered Lucene Results don't support start/hasMore calls, so the new services using these for tag queries (links and discussion) need to handle that if the results were filtered
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32158 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -948,7 +948,15 @@ public class DiscussionServiceImpl implements DiscussionService
|
||||
@Override
|
||||
public boolean hasMoreItems()
|
||||
{
|
||||
return finalLuceneResults.hasMore();
|
||||
try
|
||||
{
|
||||
return finalLuceneResults.hasMore();
|
||||
}
|
||||
catch(UnsupportedOperationException e)
|
||||
{
|
||||
// Not all lucene results support paging
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -959,6 +967,10 @@ public class DiscussionServiceImpl implements DiscussionService
|
||||
try
|
||||
{
|
||||
skipCount = finalLuceneResults.getStart();
|
||||
}
|
||||
catch(UnsupportedOperationException e) {}
|
||||
try
|
||||
{
|
||||
itemsRemainingAfterThisPage = finalLuceneResults.length();
|
||||
}
|
||||
catch(UnsupportedOperationException e) {}
|
||||
|
Reference in New Issue
Block a user