Merged searchapi (5.2.1) to 5.2.N (5.2.1)

129895 gjames: SEARCH-112: Only showing SearchContext if LastIndexedTxId > 0


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@130188 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2016-09-06 14:19:53 +00:00
parent 83e6a09f05
commit 4fb400be0a

View File

@@ -97,7 +97,10 @@ public class ResultMapper
if (jsonResultSet != null) if (jsonResultSet != null)
{ {
context = new SearchContext(jsonResultSet.getLastIndexedTxId()); if (jsonResultSet.getLastIndexedTxId() > 0)
{
context = new SearchContext(jsonResultSet.getLastIndexedTxId());
}
} }
return CollectionWithPagingInfo.asPaged(searchQuery.getPaging(), noderesults, noderesults.size() + skip < total, total, null, context); return CollectionWithPagingInfo.asPaged(searchQuery.getPaging(), noderesults, noderesults.size() + skip < total, total, null, context);