Class SearchContextStats
java.lang.Object
org.elasticsearch.xpack.esql.stats.SearchContextStats
- All Implemented Interfaces:
SearchStats
This class provides
SearchStats from a list of SearchExecutionContext's.
It contains primarily a cache of FieldStats which is dynamically updated as needed.
Each FieldStats contains FieldConfig information which is populated once at creation time.
The remaining statistics are lazily computed and cached only on demand.
This cache is not thread-safe.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.esql.stats.SearchStats
SearchStats.EmptySearchStats -
Field Summary
Fields inherited from interface org.elasticsearch.xpack.esql.stats.SearchStats
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value for a field if it's a constant (eg.longcount()longcount(FieldAttribute.FieldName field) longcount(FieldAttribute.FieldName field, org.apache.lucene.util.BytesRef value) booleanexists(FieldAttribute.FieldName field) static SearchStatsfrom(List<SearchExecutionContext> contexts) booleanbooleanbooleanbooleanbyte[]max(FieldAttribute.FieldName field, DataType dataType) byte[]min(FieldAttribute.FieldName field, DataType dataType)
-
Method Details
-
from
-
exists
- Specified by:
existsin interfaceSearchStats
-
isIndexed
- Specified by:
isIndexedin interfaceSearchStats
-
hasDocValues
- Specified by:
hasDocValuesin interfaceSearchStats
-
hasExactSubfield
- Specified by:
hasExactSubfieldin interfaceSearchStats
-
count
public long count()- Specified by:
countin interfaceSearchStats
-
count
- Specified by:
countin interfaceSearchStats
-
count
- Specified by:
countin interfaceSearchStats
-
min
- Specified by:
minin interfaceSearchStats
-
max
- Specified by:
maxin interfaceSearchStats
-
isSingleValue
- Specified by:
isSingleValuein interfaceSearchStats
-
canUseEqualityOnSyntheticSourceDelegate
- Specified by:
canUseEqualityOnSyntheticSourceDelegatein interfaceSearchStats
-
constantValue
Description copied from interface:SearchStatsReturns the value for a field if it's a constant (eg. a constant_keyword with only one value for the involved indices). NULL if the field is not a constant.- Specified by:
constantValuein interfaceSearchStats
-