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 classValuesSource.Bytes.FieldDatastatic classValuesSource.Bytes.ScriptValuesSourceimplementation for stand alone scripts returning a Bytes valuestatic classValuesSource.Bytes.WithOrdinalsSpecialization of ValuesSource.Bytes who's underlying storage de-duplicates its bytes by storing them in a per-leaf sorted lookup table.static classValuesSource.Bytes.WithScriptValuesSourcesubclass 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 DocValueBitsdocsWithValue(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 prepareRoundings.Methods inherited from class org.elasticsearch.search.aggregations.support.ValuesSource
bytesValues, hasOrdinals, needsScoresMethods 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:ValuesSourceGet 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:
docsWithValuein classValuesSource- Throws:
java.io.IOException
-
roundingPreparer
public final java.util.function.Function<Rounding,Rounding.Prepared> roundingPreparer() throws java.io.IOExceptionDescription copied from class:ValuesSourceBuild a function to prepareRoundings.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:
roundingPreparerin classValuesSource- Throws:
java.io.IOException
-