Class RangeFacetRequest


  • public class RangeFacetRequest
    extends FacetComponent.FacetBase
    Encapsulates a single facet.range request along with all its parameters. This class calculates all the ranges (gaps) required to be counted.
    • Field Detail

      • start

        protected final String start
      • end

        protected final String end
      • gap

        protected final String gap
      • hardEnd

        protected final boolean hardEnd
      • include

        protected final EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> include
      • others

        protected final EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> others
      • method

        protected final org.apache.solr.common.params.FacetParams.FacetRangeMethod method
      • minCount

        protected final int minCount
      • groupFacet

        protected final boolean groupFacet
      • startObj

        protected final Object startObj
        The computed start value of this range
      • endObj

        protected final Object endObj
        The computed end value of this range taking into account facet.range.hardend
      • gapObj

        protected final Object gapObj
        The computed gap between each range
    • Method Detail

      • getStart

        public String getStart()
        Returns:
        the start of this range as specified by FacetParams.FACET_RANGE_START parameter
      • getEnd

        public String getEnd()
        The end of this facet.range as specified by FacetParams.FACET_RANGE_END parameter

        Note that the actual computed end value can be different depending on the FacetParams.FACET_RANGE_HARD_END parameter. See endObj

      • getInclude

        public EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeInclude> getInclude()
        Returns:
        an EnumSet containing all the values specified via FacetParams.FACET_RANGE_INCLUDE parameter. Defaults to FacetParams.FacetRangeInclude.LOWER if no parameter is supplied. Includes all values from FacetParams.FacetRangeInclude enum if FacetParams.FACET_RANGE_INCLUDE includes FacetParams.FacetRangeInclude.ALL
      • getGap

        public String getGap()
        Returns:
        the gap as specified by FacetParams.FACET_RANGE_GAP parameter
      • getGapObj

        public Object getGapObj()
        Returns:
        the computed gap object
      • isHardEnd

        public boolean isHardEnd()
        Returns:
        the boolean value of FacetParams.FACET_RANGE_HARD_END parameter
      • getOthers

        public EnumSet<org.apache.solr.common.params.FacetParams.FacetRangeOther> getOthers()
        Returns:
        an EnumSet of FacetParams.FacetRangeOther values specified by FacetParams.FACET_RANGE_OTHER parameter
      • getMethod

        public org.apache.solr.common.params.FacetParams.FacetRangeMethod getMethod()
        Returns:
        the FacetParams.FacetRangeMethod to be used for computing ranges determined either by the value of FacetParams.FACET_RANGE_METHOD parameter or other internal constraints.
      • getMinCount

        public int getMinCount()
        Returns:
        the minimum allowed count for facet ranges as specified by FacetParams.FACET_MINCOUNT
      • getSchemaField

        public SchemaField getSchemaField()
        Returns:
        the SchemaField instance representing the field on which ranges have to be calculated
      • isGroupFacet

        public boolean isGroupFacet()
        Returns:
        the boolean value specified by GroupParams.GROUP_FACET parameter
      • getStartObj

        public Object getStartObj()
        Returns:
        The computed start value of this range
      • getEndObj

        public Object 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