use of io.github.ihongs.dh.search.StatisHandle.Field in project HongsCORE by ihongs.
the class StatisHelper method amount.
private int amount(Map rd, IndexSearcher finder, Map<String, Map<Range, Ratio>> counts, Map<String, Set<Range>> countx) throws HongsException {
Field[] fields = getGraderFields(counts.keySet(), rd);
try {
Query q = that.padQry(rd);
if (4 == (4 & Core.DEBUG)) {
CoreLogger.debug("StatisHelper.amount: " + q.toString());
}
if (counts.isEmpty()) {
return finder.count(q);
}
StatisGrader.Amount c = new StatisGrader.Amount(fields, counts, countx);
finder.search(q, c);
return c.count();
} catch (IOException e) {
throw new HongsException(e);
}
}
Aggregations