Class ValuesSource.Range
java.lang.Object
org.elasticsearch.search.aggregations.support.ValuesSource
org.elasticsearch.search.aggregations.support.ValuesSource.Range
- Enclosing class:
- ValuesSource
public static class ValuesSource.Range extends ValuesSource
ValuesSource for fields who's values are best thought of
as ranges of numbers, dates, or IP addresses.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSource
ValuesSource.Bytes, ValuesSource.GeoPoint, ValuesSource.Numeric, ValuesSource.Range
-
Field Summary
Fields Modifier and Type Field Description protected IndexFieldData<?>
indexFieldData
-
Constructor Summary
Constructors Constructor Description Range(IndexFieldData<?> indexFieldData, RangeType rangeType)
-
Method Summary
Modifier and Type Method Description SortedBinaryDocValues
bytesValues(org.apache.lucene.index.LeafReaderContext context)
Get a byte array like view into the values.DocValueBits
docsWithValue(org.apache.lucene.index.LeafReaderContext context)
Get a "has any values" view into the values.RangeType
rangeType()
java.util.function.Function<Rounding,Rounding.Prepared>
roundingPreparer()
Build a function to prepareRounding
s.Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSource
hasOrdinals, needsScores
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
indexFieldData
-
-
Constructor Details
-
Range
-
-
Method Details
-
bytesValues
Description copied from class:ValuesSource
Get a byte array like view into the values. This is the "native" way to accessValuesSource.Bytes
-style values.- Specified by:
bytesValues
in classValuesSource
-
docsWithValue
public DocValueBits docsWithValue(org.apache.lucene.index.LeafReaderContext context) throws java.io.IOExceptionDescription copied from class:ValuesSource
Get a "has any values" view into the values. It'll try to pick the "most native" way to check if there are any values, but it builds its own view into the values so if you need any of the actual values its best to use something likeValuesSource.bytesValues(org.apache.lucene.index.LeafReaderContext)
orValuesSource.Numeric.doubleValues(org.apache.lucene.index.LeafReaderContext)
but if you just need to know if there are any values then use this.- Specified by:
docsWithValue
in classValuesSource
- Throws:
java.io.IOException
-
roundingPreparer
public java.util.function.Function<Rounding,Rounding.Prepared> roundingPreparer() throws java.io.IOExceptionDescription copied from class:ValuesSource
Build a function to prepareRounding
s.This returns a Function because auto date histogram will need to call it many times over the course of running the aggregation. Other aggregations should feel free to call it once.
- Specified by:
roundingPreparer
in classValuesSource
- Throws:
java.io.IOException
-
rangeType
-