// solrQuery.addFilterQuery("authors_fauthority:rp00001");
solrQuery.setFacetLimit(Integer.MAX_VALUE);
solrQuery.setFacetMinCount(1);
solrQuery.setRows(0);
QueryResponse rsp = getService().getSearcher().search(solrQuery);
FacetField facets = rsp.getFacetField(getFacetFieldQuery());
System.out.println(facets.getValueCount());
// for each interests get authority's authors
List<VisualizationGraphNode> result = null;
int counter = 0;
external: for (Count facetElement : facets.getValues())
{
counter++;
log.debug(getConnectionName() + " - " + counter + " of "
+ facets.getValueCount());
System.out.println(getConnectionName() + " - " + counter + " of "
+ facets.getValueCount());
result = new LinkedList<VisualizationGraphNode>();
try
{
String facetValue = facetElement.getName();
solrQuery = new SolrQuery();
String query = (useJoin()?getJoin():"") + getFacetFieldQuery() + ":\"" + ClientUtils.escapeQueryChars(facetValue) + "\"";
solrQuery.setQuery(query);
solrQuery.addFacetField(getFacet(facetValue));
solrQuery.setFacetMinCount(1);
solrQuery.setFacetLimit(getFacetLimit());
solrQuery.setRows(0);
rsp = getService().getSearcher().search(solrQuery);
FacetField relations = rsp.getFacetField(getFacet(facetValue));
int i = 0;
internal: for (Count relation : relations.getValues())
{
log.debug("" + counter + " works on " + i + " of "
+ relations.getValueCount());
System.out.println(getConnectionName() + " - " + counter
+ " of " + facets.getValueCount() + " works on "
+ i + " of " + relations.getValueCount());
String aaa = relation.getName();
String[] split = aaa.split("\\|\\|\\|");
String a = aaa;
String a_authority = null;
String a_dept = null;
String a_displayValue = "";
if (split.length > 1)
{
String[] splitAuthority = split[1].split(splitterAuthority);
a_displayValue = splitAuthority[0];
if (splitAuthority.length > 1)
{
a_authority = splitAuthority[1];
// a_dept = ResearcherPageUtils
// .getDepartment(a_authority);
a_dept = getDepartmentFromSOLR(a_authority);
}
}
internalprivate: for (int j = i; j < relations.getValues()
.size(); j++)
{
List<String> values = new LinkedList<String>();
values.add(facetValue);
String bbb = relations.getValues().get(j).getName();
split = bbb.split("\\|\\|\\|");
String b = bbb;
String b_authority = null;
String b_dept = null;