From c7303bb623410bc6039828c3afde13475f90df90 Mon Sep 17 00:00:00 2001 From: hjkhjk54 Date: Thu, 8 Dec 2011 19:47:46 +0000 Subject: [PATCH] updates to vclassgroupCache to set individual count of classgroup without adding the counts of the classes in the classgroup but instead getting the results numFound. For NIHVIVO-3456 --- .../mannlib/vitro/webapp/dao/jena/VClassGroupCache.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassGroupCache.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassGroupCache.java index ecf8efca9..822523b61 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassGroupCache.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/dao/jena/VClassGroupCache.java @@ -295,9 +295,11 @@ public class VClassGroupCache { log.debug("query: " + query); QueryResponse rsp = solrServer.query(query); - + //Get individual count + long individualCount = rsp.getResults().getNumFound(); + log.debug("Number of individuals found " + individualCount); + group.setIndividualCount((int) individualCount); //get counts for classes - group.setIndividualCount(0); FacetField ff = rsp.getFacetField( VitroSearchTermNames.RDFTYPE ); List counts = ff.getValues(); for( Count ct: counts){ @@ -312,7 +314,6 @@ public class VClassGroupCache { for( VClass clz : group){ if( clz.getURI().equals(classUri)){ clz.setEntityCount( (int) individualsInClass ); - group.setIndividualCount( ((int)individualsInClass + group.getIndividualCount())); } }