Class RangeFacetRequest
java.lang.Object
org.apache.solr.handler.component.FacetComponent.FacetBase
org.apache.solr.handler.component.RangeFacetRequest
Encapsulates a single facet.range request along with all its parameters. This class calculates
all the ranges (gaps) required to be counted.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single facet range (or gap) for which the count is to be calculated -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Stringprotected final ObjectThe computed end value of this range taking into account facet.range.hardendprotected final List<RangeFacetRequest.FacetRange> protected final Stringprotected final ObjectThe computed gap between each rangeprotected final booleanprotected final booleanprotected final EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> protected final org.apache.solr.common.params.FacetParams.FacetRangeMethodprotected final intprotected final EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> protected final SchemaFieldprotected final Stringprotected final ObjectThe computed start value of this range -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetEnd()The end of this facet.range as specified byFacetParams.FACET_RANGE_ENDparameterThe end of this facet.range as calculated using the value of facet.range.end parameter and facet.range.hardend.getGap()EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> org.apache.solr.common.params.FacetParams.FacetRangeMethodintEnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> getStart()booleanbooleanMethods inherited from class org.apache.solr.handler.component.FacetComponent.FacetBase
getExcludeTags, getKey, getTags, getThreadCount, getType
-
Field Details
-
schemaField
-
start
-
end
-
gap
-
hardEnd
protected final boolean hardEnd -
include
-
others
-
method
protected final org.apache.solr.common.params.FacetParams.FacetRangeMethod method -
minCount
protected final int minCount -
groupFacet
protected final boolean groupFacet -
facetRanges
-
startObj
The computed start value of this range -
endObj
The computed end value of this range taking into account facet.range.hardend -
gapObj
The computed gap between each range
-
-
Constructor Details
-
RangeFacetRequest
-
-
Method Details
-
getStart
- Returns:
- the start of this range as specified by
FacetParams.FACET_RANGE_STARTparameter
-
getEnd
The end of this facet.range as specified byFacetParams.FACET_RANGE_ENDparameterNote that the actual computed end value can be different depending on the
FacetParams.FACET_RANGE_HARD_ENDparameter. SeeendObj -
getInclude
- Returns:
- an
EnumSetcontaining all the values specified viaFacetParams.FACET_RANGE_INCLUDEparameter. Defaults toFacetParams.FacetRangeInclude.LOWERif no parameter is supplied. Includes all values fromFacetParams.FacetRangeIncludeenum ifFacetParams.FACET_RANGE_INCLUDEincludesFacetParams.FacetRangeInclude.ALL
-
getGap
- Returns:
- the gap as specified by
FacetParams.FACET_RANGE_GAPparameter
-
getGapObj
- Returns:
- the computed gap object
-
isHardEnd
public boolean isHardEnd()- Returns:
- the boolean value of
FacetParams.FACET_RANGE_HARD_ENDparameter
-
getOthers
- Returns:
- an
EnumSetofFacetParams.FacetRangeOthervalues specified byFacetParams.FACET_RANGE_OTHERparameter
-
getMethod
public org.apache.solr.common.params.FacetParams.FacetRangeMethod getMethod()- Returns:
- the
FacetParams.FacetRangeMethodto be used for computing ranges determined either by the value ofFacetParams.FACET_RANGE_METHODparameter or other internal constraints.
-
getMinCount
public int getMinCount()- Returns:
- the minimum allowed count for facet ranges as specified by
FacetParams.FACET_MINCOUNT
-
getSchemaField
- Returns:
- the
SchemaFieldinstance representing the field on which ranges have to be calculated
-
isGroupFacet
public boolean isGroupFacet()- Returns:
- the boolean value specified by
GroupParams.GROUP_FACETparameter
-
getFacetRanges
- Returns:
- a
ListofRangeFacetRequest.FacetRangeobjects representing the ranges (gaps) for which range counts are to be calculated.
-
getStartObj
- Returns:
- The computed start value of this range
-
getEndObj
The end of this facet.range as calculated using the value of facet.range.end parameter and facet.range.hardend. This can be different from the value specified in facet.range.end if facet.range.hardend=true
-