Module org.elasticsearch.server
Class RangeAggregator.Range
java.lang.Object
org.elasticsearch.search.aggregations.bucket.range.RangeAggregator.Range
- All Implemented Interfaces:
- Writeable,- ToXContent,- ToXContentObject
- Direct Known Subclasses:
- GeoDistanceAggregationBuilder.Range
- Enclosing class:
- RangeAggregator
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final doublestatic final ParseFieldprotected final Stringprotected final Stringstatic final ParseFieldprotected final Doubleprotected final Doublestatic final ConstructingObjectParser<RangeAggregator.Range,Void> protected final doublestatic final ParseFieldprotected final StringFields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionRange(String key, Double from, String fromAsStr, Double to, String toAsStr, DoubleUnaryOperator fixPrecision) Build the range.Range(StreamInput in) Read from a stream.
- 
Method SummaryModifier and TypeMethodDescriptionbooleandoublegetFrom()getKey()doublegetTo()inthashCode()booleanmatches(double value) toString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObjectisFragment
- 
Field Details- 
KEY_FIELD
- 
FROM_FIELD
- 
TO_FIELD
- 
key
- 
fromprotected final double from
- 
originalFrom
- 
fromAsStr
- 
toprotected final double to
- 
originalTo
- 
toAsStr
- 
PARSER
 
- 
- 
Constructor Details- 
Rangepublic Range(String key, Double from, String fromAsStr, Double to, String toAsStr, DoubleUnaryOperator fixPrecision) Build the range. Generally callers should preferRange(String, Double, Double)orRange(String, String, String). If you must call this know that consumers preferfromandtoparameters if they are non-null and finite. Otherwise they parse fromfromrStrandtoStr.originalFromandoriginalToare used to preserve the original values offromandto. This is because precision is downgraded to float values when they are stored. Downgrading precision for float values surfaces into precision artifacts at serialization time as a result of treating float values as double values. (SeeRangeAggregationBuilder.innerBuild(AggregationContext, ValuesSourceConfig, AggregatorFactory, AggregatorFactories.Builder))
- 
Range
- 
Range
- 
Range
- 
RangeRead from a stream.- Throws:
- IOException
 
 
- 
- 
Method Details- 
writeToDescription copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
- writeToin interface- Writeable
- Throws:
- IOException
 
- 
getFrompublic double getFrom()
- 
getTopublic double getTo()
- 
getOriginalFrom
- 
getOriginalTo
- 
getFromAsString
- 
getToAsString
- 
getKey
- 
matchespublic boolean matches(double value) 
- 
toString
- 
toXContentpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
- toXContentin interface- ToXContent
- Throws:
- IOException
 
- 
hashCodepublic int hashCode()
- 
equals
 
-