Merged 5.2.N (5.2.2) to HEAD (5.2)

136224 gjames: SEARCH-435: Using SolrJSONResultSet


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@137480 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Andrei Rebegea
2017-06-15 11:01:53 +00:00
parent cf1d2fd397
commit 4773f96c26

View File

@@ -34,6 +34,7 @@ import org.alfresco.repo.search.impl.solr.facet.facetsresponse.GenericBucket;
import org.alfresco.repo.search.impl.solr.facet.facetsresponse.GenericFacetResponse;
import org.alfresco.repo.search.impl.solr.facet.facetsresponse.GenericFacetResponse.FACET_TYPE;
import org.alfresco.repo.search.impl.solr.facet.facetsresponse.MetricCount;
import org.alfresco.repo.security.permissions.impl.acegi.FilteringResultSet;
import org.alfresco.repo.version.Version2Model;
import org.alfresco.rest.api.DeletedNodes;
import org.alfresco.rest.api.Nodes;
@@ -508,17 +509,18 @@ public class ResultMapper
*/
protected SolrJSONResultSet findSolrResultSet(ResultSet results)
{
//This may get more complicated if the results are wrapped in another ResultSet class
if (results instanceof SolrJSONResultSet)
ResultSet theResultSet = results;
if (results instanceof FilteringResultSet)
{
return (SolrJSONResultSet) results;
theResultSet = ((FilteringResultSet) results).getUnFilteredResultSet();
}
/**
if (results instanceof PagingLuceneResultSet)
if (theResultSet instanceof SolrJSONResultSet)
{
return findSolrResultSet(((PagingLuceneResultSet) results).getWrapped());
return (SolrJSONResultSet) theResultSet;
}
**/
return null;
}
}