NamedList fieldCounts = new NamedList();
GroupbyItem[] counts = dff.getPairSorted(limit_offset);
if(dff.recordcount!=null)
{
GroupbyItem recordcount=dff.recordcount;
fieldCounts.add("count", recordcount.toNamedList());
}
ArrayList<Object> list=new ArrayList<Object>();
int end = limit_offset> counts.length ?counts.length:limit_offset;
for (int i=offset; i<end; i++) {