Class ValuesSource.Bytes
java.lang.Object
org.elasticsearch.search.aggregations.support.ValuesSource
org.elasticsearch.search.aggregations.support.ValuesSource.Bytes
- Direct Known Subclasses:
ValuesSource.Bytes.FieldData
,ValuesSource.Bytes.Script
,ValuesSource.Bytes.WithOrdinals
,ValuesSource.Bytes.WithScript
- Enclosing class:
- ValuesSource
public abstract static class ValuesSource.Bytes extends ValuesSource
ValuesSource for fields who's values are best thought of
as byte arrays without any other meaning like
keyword
or
ip
. Aggregations that operate on these values presume only
that DocValueFormat.format(BytesRef)
will correctly convert
the resulting BytesRef
into something human readable.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValuesSource.Bytes.FieldData
static class
ValuesSource.Bytes.Script
ValuesSource
implementation for stand alone scripts returning a Bytes valuestatic class
ValuesSource.Bytes.WithOrdinals
Specialization of ValuesSource.Bytes who's underlying storage de-duplicates its bytes by storing them in a per-leaf sorted lookup table.static class
ValuesSource.Bytes.WithScript
ValuesSource
subclass for Bytes fields with a Value Script appliedNested classes/interfaces inherited from class org.elasticsearch.search.aggregations.support.ValuesSource
ValuesSource.Bytes, ValuesSource.GeoPoint, ValuesSource.Numeric, ValuesSource.Range
-
Constructor Summary
Constructors Constructor Description Bytes()
-
Method Summary
Modifier and Type Method Description DocValueBits
docsWithValue(org.apache.lucene.index.LeafReaderContext context)
Get a "has any values" view into the values.java.util.function.Function<Rounding,Rounding.Prepared>
roundingPreparer()
Build a function to prepareRounding
s.Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSource
bytesValues, hasOrdinals, needsScores
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Bytes
public Bytes()
-
-
Method Details
-
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 final 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
-