Class FacetOptions.FieldWithRangeParameters<T extends FacetOptions.FieldWithRangeParameters<?,?,?>,R,G>
java.lang.Object
org.springframework.data.solr.core.query.SimpleField
org.springframework.data.solr.core.query.FieldWithQueryParameters<FacetOptions.FacetParameter>
org.springframework.data.solr.core.query.FacetOptions.FieldWithRangeParameters<T,R,G>
- Type Parameters:
T- range field implementation typeR- type of rangeG- type of gap
- All Implemented Interfaces:
Iterable<FacetOptions.FacetParameter>,Field
- Direct Known Subclasses:
FacetOptions.FieldWithDateRangeParameters,FacetOptions.FieldWithNumericRangeParameters
- Enclosing class:
- FacetOptions
public abstract static class FacetOptions.FieldWithRangeParameters<T extends FacetOptions.FieldWithRangeParameters<?,?,?>,R,G>
extends FieldWithQueryParameters<FacetOptions.FacetParameter>
Class representing common facet range parameters.
- Since:
- 1.5
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected TaddFacetRangeParameter(String parameterName, Object value) getEnd()getGap()The size of the range to be added to the lower bound.If the last range should be abruptly ended even if the end doesn't satisfies: (start - end) % gap = 0.org.apache.solr.common.params.FacetParams.FacetRangeIncludeThe definition of how boundaries (lower and upper) shall be handled (exclusive or inclusive) on range facet requests.org.apache.solr.common.params.FacetParams.FacetRangeOthergetOther()The definition of additional (other) counts for the range facet.getStart()Start value configured for this field range facet.setHardEnd(Boolean rangeHardEnd) Defines if the last range should be abruptly ended even if the end doesn't satisfies: (start - end) % gap = 0.setInclude(org.apache.solr.common.params.FacetParams.FacetRangeInclude rangeInclude) Defines how boundaries (lower and upper) shall be handled (exclusive or inclusive) on range facet requests.setOther(org.apache.solr.common.params.FacetParams.FacetRangeOther rangeOther) Defines the additional (other) counts for the range facet, i.e.Methods inherited from class org.springframework.data.solr.core.query.FieldWithQueryParameters
addQueryParameter, getQueryParameter, getQueryParameters, getQueryParameterValue, hasQueryParameters, iterator, removeQueryParameterMethods inherited from class org.springframework.data.solr.core.query.SimpleField
equals, getName, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FieldWithRangeParameters
- Parameters:
name- field namestart- range facet startend- range facet endgap- gap to be used for faceting between start and end
-
-
Method Details
-
setHardEnd
Defines if the last range should be abruptly ended even if the end doesn't satisfies: (start - end) % gap = 0.- Parameters:
rangeHardEnd- wheneverfalsewill expect to have the last range with the same size as the other ranges entries for the query, otherwise (true), may present the last range smaller than the other range entries.- Returns:
- this
- See Also:
-
FacetParams.FACET_RANGE_HARD_END
-
getHardEnd
If the last range should be abruptly ended even if the end doesn't satisfies: (start - end) % gap = 0.- Returns:
- if hard end should be used,
nullwill be returned if not set - See Also:
-
FacetParams.FACET_RANGE_HARD_END
-
setOther
Defines the additional (other) counts for the range facet, i.e. count of documents that are before start of the range facet, end of range facet or even between start and end.- Parameters:
rangeOther- which other counts shall be added to the facet result- Returns:
- this
- See Also:
-
FacetParams.FacetRangeOther
-
getOther
@Nullable public org.apache.solr.common.params.FacetParams.FacetRangeOther getOther()The definition of additional (other) counts for the range facet.- Returns:
- null which other counts shall be added to the facet result
- See Also:
-
FacetParams.FacetRangeOther
-
setInclude
Defines how boundaries (lower and upper) shall be handled (exclusive or inclusive) on range facet requests.- Parameters:
rangeInclude- include option for range- Returns:
- this
- See Also:
-
FacetParams.FacetRangeInclude
-
getInclude
@Nullable public org.apache.solr.common.params.FacetParams.FacetRangeInclude getInclude()The definition of how boundaries (lower and upper) shall be handled (exclusive or inclusive) on range facet requests.- Returns:
- null if not set
- See Also:
-
FacetParams.FacetRangeInclude
-
addFacetRangeParameter
-
getGap
The size of the range to be added to the lower bound.- Returns:
- size of each range.
- See Also:
-
FacetParams.FACET_RANGE_GAP
-
getStart
Start value configured for this field range facet.- Returns:
- upper bound for the ranges.
- See Also:
-
FacetParams.FACET_RANGE_START
-
getEnd
- Returns:
- lower bound for the ranges.
- See Also:
-
FacetParams.FACET_RANGE_END
-