Package com.attivio.sdk.search.facet
Class RangeFacetRequest
- java.lang.Object
-
- com.attivio.sdk.search.facet.FacetRequest
-
- com.attivio.sdk.search.facet.RangeFacetRequest
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<FacetRange>
public class RangeFacetRequest extends FacetRequest implements java.lang.Iterable<FacetRange>
A FacetRequest requesting counts for documents with values in specified ranges.NOTE: for all ranges, the min value is inclusive and the max value is exclusive.
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.attivio.sdk.search.facet.FacetRequest
FacetRequest.SortBy
-
-
Field Summary
-
Fields inherited from class com.attivio.sdk.search.facet.FacetRequest
DEFAULT_MAX_MEMORY_USAGE, DEFAULT_PRIMARY_SORT, DEFAULT_SAMPLE_MODE, DEFAULT_SECONDARY_SORT, DEFAULT_SORT_BY
-
-
Constructor Summary
Constructors Constructor Description RangeFacetRequest()
RangeFacetRequest(FieldExpression field)
RangeFacetRequest(java.lang.String name)
Construct a new RangeFacetRequest that contains 0 ranges.RangeFacetRequest(java.lang.String field, double min, double max)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.RangeFacetRequest(java.lang.String field, double min, double max, int buckets)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.RangeFacetRequest(java.lang.String field, long min, long max)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.RangeFacetRequest(java.lang.String field, long min, long max, int buckets)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.RangeFacetRequest(java.lang.String name, FieldExpression field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(double min, double max)
Add a double precision floating point range to this request.void
add(float min, float max)
Add a floating point range to this request.void
add(int min, int max)
Add an integer range to this request.void
add(long min, long max)
Add a long integer range to this request.void
add(FacetRange range)
Add a range to this request.void
add(java.lang.String label, double min, double max)
Add a double precision floating point range to this request.void
add(java.lang.String label, float min, float max)
Add a floating point range to this request.void
add(java.lang.String label, int min, int max)
Add an integer range to this request.void
add(java.lang.String label, long min, long max)
Add a long integer range to this request.void
add(java.lang.String label, java.math.BigDecimal min, java.math.BigDecimal max)
Add an integer range to this request.void
add(java.lang.String label, java.util.Date min, java.util.Date max)
Add a Date range to this request.protected int
addParameters(java.lang.StringBuilder buffer, int index)
boolean
equals(java.lang.Object other)
java.util.ArrayList<FacetRange>
getRanges()
Get the facet ranges.int
hashCode()
boolean
isFacetFinder()
true
if the facet finder can replace this FacetRequest with a suggested FacetRequest.java.util.Iterator<FacetRange>
iterator()
Get an iterator over all ranges.void
setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.-
Methods inherited from class com.attivio.sdk.search.facet.FacetRequest
addName, addParameter, clone, getChildFacet, getDistributedMaxBuckets, getDistributedMinBucketCount, getField, getFieldExpression, getMaxBuckets, getMaxMemoryUsage, getMinBucketCount, getName, getPrimarySortOrder, getRawDistributedMaxBuckets, getRawDistributedMinBucketCount, getRawMaxBuckets, getRawMinBucketCount, getSecondarySortOrder, getShallowMode, getSortBy, isCalculateStatistics, setCalculateStatistics, setChildFacet, setDefaults, setDistributedMaxBuckets, setDistributedMaxBuckets, setDistributedMinBucketCount, setDistributedMinBucketCount, setField, setFieldExpression, setMaxBuckets, setMaxBuckets, setMaxMemoryUsage, setMinBucketCount, setMinBucketCount, setName, setPrimarySortOrder, setSecondarySortOrder, setShallowMode, setSortOrder, setSortOrder, setSortOrder, toFacetBuilder, toString, valueOf, valueOf
-
-
-
-
Constructor Detail
-
RangeFacetRequest
public RangeFacetRequest()
-
RangeFacetRequest
public RangeFacetRequest(java.lang.String name)
Construct a new RangeFacetRequest that contains 0 ranges.
-
RangeFacetRequest
public RangeFacetRequest(java.lang.String name, FieldExpression field)
-
RangeFacetRequest
public RangeFacetRequest(FieldExpression field)
-
RangeFacetRequest
public RangeFacetRequest(java.lang.String field, long min, long max)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.
-
RangeFacetRequest
public RangeFacetRequest(java.lang.String field, double min, double max)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.
-
RangeFacetRequest
public RangeFacetRequest(java.lang.String field, long min, long max, int buckets)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.
-
RangeFacetRequest
public RangeFacetRequest(java.lang.String field, double min, double max, int buckets)
Construct a new RangeFacetRequest with fixed size ranges frommin
tomax
.
-
-
Method Detail
-
isFacetFinder
public final boolean isFacetFinder()
true
if the facet finder can replace this FacetRequest with a suggested FacetRequest.This will replace a FacetRequest for a numeric field with a RangeFacetRequest when facet finder runs.
- Overrides:
isFacetFinder
in classFacetRequest
-
setFacetFinder
public final void setFacetFinder(boolean value)
Set if FacetFinder is allowed to provide a suggestion for this FacetRequest.- Overrides:
setFacetFinder
in classFacetRequest
-
getRanges
public java.util.ArrayList<FacetRange> getRanges()
Get the facet ranges.
-
iterator
public java.util.Iterator<FacetRange> iterator()
Get an iterator over all ranges.- Specified by:
iterator
in interfacejava.lang.Iterable<FacetRange>
-
add
public void add(FacetRange range)
Add a range to this request.
-
add
public void add(java.lang.String label, java.util.Date min, java.util.Date max)
Add a Date range to this request.
-
add
public void add(int min, int max)
Add an integer range to this request.
-
add
public void add(java.lang.String label, int min, int max)
Add an integer range to this request.
-
add
public void add(java.lang.String label, java.math.BigDecimal min, java.math.BigDecimal max)
Add an integer range to this request.
-
add
public void add(long min, long max)
Add a long integer range to this request.
-
add
public void add(java.lang.String label, long min, long max)
Add a long integer range to this request.
-
add
public void add(float min, float max)
Add a floating point range to this request.
-
add
public void add(java.lang.String label, float min, float max)
Add a floating point range to this request.
-
add
public void add(double min, double max)
Add a double precision floating point range to this request.
-
add
public void add(java.lang.String label, double min, double max)
Add a double precision floating point range to this request.
-
addParameters
protected int addParameters(java.lang.StringBuilder buffer, int index)
- Overrides:
addParameters
in classFacetRequest
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classFacetRequest
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classFacetRequest
-
-