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:
Nick Burch
2011-11-21 17:35:59 +00:00
parent eb8f85a4fd
commit 772056a903
2 changed files with 35 additions and 4 deletions

View File

@@ -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) {}