。設置類型(類型名)
。(搜索類型。QUERY _ THEN _ FETCH);
...
field1Terms=。術語(“group_by_field1“)。字段(“字段1“)。大小(0);
SumBuilderfield2Sum=。sum(“sum _ field 2“)。field(“field 2“);
SumBuilderfield3Sum=。sum(“sum _ field 3“)。field(“field 3“);
字段1條款。(field2Sum)。(field 3 sum);
...
srb。(PID terms);
...
sr=srb.execute()。action get();
...