Class Facets
- java.lang.Object
-
- com.lucidworks.search.dsl.DslBase
-
- com.lucidworks.search.dsl.request.DslCloneable
-
- com.lucidworks.search.dsl.request.Facets
-
public class Facets extends DslCloneable
Facets parameters
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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 Summary
Constructors Constructor Description Facets(java.util.List<FacetField> fields, java.util.List<FacetRange> ranges, java.lang.Boolean groupFacets, Facets.FacetGroupingMethod groupingMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addOrReplaceFacetFieldForFieldName(FacetField facetField)
void
addOrReplaceFacetRangeForFieldName(FacetRange facetRange)
Facets
clone()
java.util.Optional<FacetField>
getFacetFieldByFieldName(java.lang.String fieldName)
java.util.Optional<FacetRange>
getFacetRangeByFieldName(java.lang.String fieldName)
java.util.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.java.util.List<FacetRange>
getRanges()
void
setFields(java.util.Collection<? extends FacetField> fields)
void
setRanges(java.util.List<? extends FacetRange> ranges)
-
Methods inherited from class com.lucidworks.search.dsl.request.DslCloneable
clone, deepClone
-
-
-
-
Constructor Detail
-
Facets
public Facets(java.util.List<FacetField> fields, java.util.List<FacetRange> ranges, java.lang.Boolean groupFacets, Facets.FacetGroupingMethod groupingMethod)
-
-
Method Detail
-
getFields
public java.util.List<FacetField> getFields()
- Returns:
- faceting by fields parameters
-
setFields
public void setFields(java.util.Collection<? extends FacetField> fields)
-
getRanges
public java.util.List<FacetRange> getRanges()
- Returns:
- faceting by ranges parameters
-
setRanges
public void setRanges(java.util.List<? extends FacetRange> ranges)
-
getFacetFieldByFieldName
public java.util.Optional<FacetField> getFacetFieldByFieldName(java.lang.String fieldName)
-
getFacetRangeByFieldName
public java.util.Optional<FacetRange> getFacetRangeByFieldName(java.lang.String fieldName)
-
addOrReplaceFacetFieldForFieldName
public void addOrReplaceFacetFieldForFieldName(FacetField facetField)
-
addOrReplaceFacetRangeForFieldName
public void addOrReplaceFacetRangeForFieldName(FacetRange facetRange)
-
getGroupFacets
public boolean getGroupFacets()
- Returns:
- group facets flag. If true, facets counts are calculated after grouping, otherwise before.
Default value is true.
This flag is only used when
Group
was specified
-
clone
public Facets clone()
- Specified by:
clone
in classDslCloneable
-
getGroupingMethod
public 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. For the list of values seeFacets.FacetGroupingMethod
.Default value is
Facets.FacetGroupingMethod.HEADER_DOC
.- Returns:
- facet grouping method
-
-