Assert.notNull(getName(), "Facet name can't be a null !!!");
Assert.isTrue(StringUtils.isNotBlank(field) || StringUtils.isNotBlank(keyField) && StringUtils.isNotBlank(valueField), "Please select field or key field and value field !!!");
RangeFacetBuilder builder = FacetBuilders.rangeFacet(getName());
if (StringUtils.isNotBlank(keyField)) {
builder.keyField(keyField).valueField(valueField);
} else {
builder.field(field);
}
for (Entry entry : entries) {