long tt = 0;
long hitscount = 0;
for(int x=0; x< inNumItr; x++)
{
long t0 = System.currentTimeMillis();
BoboBrowser browser = new BoboBrowser(boboReader);
BrowseRequest req = new BrowseRequest();
req.setCount(500);
FacetSpec spec = new FacetSpec();
spec.setMaxCount(50);
spec.setOrderBy(FacetSortSpec.OrderHitsDesc);
// req.setFacetSpec("ccid", spec);
// req.setFacetSpec("pcid", spec);
// req.setFacetSpec("education_id", spec);
req.setFacetSpec("geo_region", spec);
// req.setFacetSpec("industry", spec);
String qstr = words[nextInt()];
// qstr = "project manager";
String[] terms = qstr.split(" ");
BooleanQuery q = new BooleanQuery();
for(String s : terms)
{
q.add( new TermQuery(new Term("b",s)), Occur.MUST);
}
// q.add(new MatchAllDocsQuery(), Occur.MUST);
req.setQuery(q);//new TermQuery(new Term("b",qstr)));
BrowseSelection sel = new BrowseSelection("ccid");
sel.addValue("0000001384");
// req.addSelection(sel );
BrowseSelection seli = new BrowseSelection("industry");
seli.addValue("0000000052");
// req.addSelection(seli );
long tf0=0;
long tf1=0;
BrowseResult bres = browser.browse(req);
for(Entry<String, FacetAccessible> entry: bres.getFacetMap().entrySet())
{
// System.out.println(entry.getKey());
FacetAccessible fa = entry.getValue();
tf0 = System.currentTimeMillis();
List<BrowseFacet> facets = fa.getFacets();
tf1=System.currentTimeMillis();
System.out.println(tf1 - tf0 + "\tfacet "+entry.getKey()+" get time\tsize: " + facets.size());
// System.out.println(Arrays.toString(facets.toArray()));
fa.close();
}
browser.close();
// System.out.println(t2 - t0 +"\ttotal time\t\t\t hits: "+ bres.getNumHits());
hitscount += bres.getNumHits();
long t2 = System.currentTimeMillis();
tt+= (t2 - t0);
browser.close();
// System.out.println(t2 - t0 -(tf1-tf0)+"\tsearch time\t");
}
if (hitscount> 80000)System.out.println("avg hits count: " + hitscount/inNumItr);
try
{