public void finishStage(ResponseBuilder rb) {
}
private static void fillResponse(BrowseRequest req,BrowseResult res,SolrQueryResponse solrRsp){
NamedList facetFieldList = new SimpleOrderedMap();
Map<String,FacetAccessible> facetMap = res.getFacetMap();
Set<Entry<String,FacetAccessible>> entries = facetMap.entrySet();
for (Entry<String,FacetAccessible> entry : entries){
NamedList facetList = new NamedList();
facetFieldList.add(entry.getKey(), facetList);
FacetAccessible facetAccessbile = entry.getValue();
List<BrowseFacet> facets = facetAccessbile.getFacets();
for (BrowseFacet facet : facets){
facetList.add(facet.getValue(),facet.getFacetValueHitCount());
}
}
NamedList facetResList = new SimpleOrderedMap();
facetResList.add("facet_fields", facetFieldList);
NamedList facetQueryList = new SimpleOrderedMap();
facetResList.add("facet_queries", facetQueryList);
solrRsp.add( "facet_counts", facetResList );
}