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
This commit is contained in:
parent
8cf98a75fa
commit
c7303bb623
1 changed files with 4 additions and 3 deletions
|
@ -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<Count> 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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue