for (String fieldName : queryMethod.getFieldStats()) {
options.addField(fieldName);
}
for (String facetFieldName : queryMethod.getStatsFacets()) {
options.addFacet(facetFieldName);
}
options.setCalcDistinct(queryMethod.isFieldStatsCountDistinctEnable());
Collection<String> selectiveCountDistinct = queryMethod.getStatsSelectiveCountDistinctFields();