} else if (keyFieldMapper.fieldDataType() == FieldDataType.DefaultTypes.FLOAT) {
return new TermsStatsDoubleFacetCollector(facetName, keyField, valueField, size, comparatorType, context, scriptLang, script, params);
}
}
return new TermsStatsStringFacetCollector(facetName, keyField, valueField, size, comparatorType, context, scriptLang, script, params);
}