public class Facets extends DslCloneable
Modifier and Type | Class and Description |
---|---|
static class |
Facets.FacetGroupingMethod
This field switches between grouped field facets counted based on header docs after collapse,
or based on number of groups which contain at least one document with a given value of a facet field.
|
Constructor and Description |
---|
Facets(List<FacetField> fields,
List<FacetRange> ranges,
Boolean groupFacets,
Facets.FacetGroupingMethod groupingMethod) |
Modifier and Type | Method and Description |
---|---|
void |
addOrReplaceFacetFieldForFieldName(FacetField facetField) |
void |
addOrReplaceFacetRangeForFieldName(FacetRange facetRange) |
Facets |
clone() |
Optional<FacetField> |
getFacetFieldByFieldName(String fieldName) |
Optional<FacetRange> |
getFacetRangeByFieldName(String fieldName) |
List<FacetField> |
getFields() |
boolean |
getGroupFacets() |
Facets.FacetGroupingMethod |
getGroupingMethod()
This field switches between grouped field facets counted based on header docs after collapse,
or based on number of groups which contain at least one document with a given value of a facet field.
|
List<FacetRange> |
getRanges() |
void |
setFields(Collection<? extends FacetField> fields) |
void |
setRanges(List<? extends FacetRange> ranges) |
clone, deepClone
public Facets(List<FacetField> fields, List<FacetRange> ranges, Boolean groupFacets, Facets.FacetGroupingMethod groupingMethod)
public List<FacetField> getFields()
public void setFields(Collection<? extends FacetField> fields)
public List<FacetRange> getRanges()
public void setRanges(List<? extends FacetRange> ranges)
public Optional<FacetField> getFacetFieldByFieldName(String fieldName)
public Optional<FacetRange> getFacetRangeByFieldName(String fieldName)
public void addOrReplaceFacetFieldForFieldName(FacetField facetField)
public void addOrReplaceFacetRangeForFieldName(FacetRange facetRange)
public boolean getGroupFacets()
This flag is only used when Group
was specified
public Facets clone()
clone
in class DslCloneable
public Facets.FacetGroupingMethod getGroupingMethod()
Facets.FacetGroupingMethod
.
Default value is Facets.FacetGroupingMethod.HEADER_DOC
.