if (maxRecs == -2) {
maxRecs = Val.chkInt(this.getParameterValue(request,"maxrecords"),-1);
}
int minFreq = Val.chkInt(this.getParameterValue(request,"minFrequency"),-1);
int maxFreq = Val.chkInt(this.getParameterValue(request,"maxFrequency"),-1);
SingleFieldStats stats = new SingleFieldStats(field,maxRecs,minFreq,maxFreq);
stats.collectStats(statsRequest,reader);
// } else if (term.length() > 0) {
// SingleTermStats stats = new SingleTermStats(term);
// stats.collectStats(statsRequest,reader);
// } else if (pathInfo.equals("terms")){
// GlobalTermStats stats = new GlobalTermStats();
// stats.collectStats(statsRequest,reader);
} else {
//GlobalFieldStats stats = new GlobalFieldStats();
SummaryStats stats = new SummaryStats();
stats.collectStats(statsRequest,reader);
}
// } catch (Exception ex) {
// response.setContentType("text/plain;charset=UTF-8");