Class EsField
java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
- All Implemented Interfaces:
Writeable
- Direct Known Subclasses:
DateEsField,InvalidMappedField,KeywordEsField,MultiTypeEsField,TextEsField,UnsupportedEsField
Information about a field in an ES index.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic enumFields in a TSDB can be either dimensions or metrics.Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsConstructorDescriptionEsField(String name, DataType esDataType, Map<String, EsField> properties, boolean aggregatable, boolean isAlias) EsField(String name, DataType esDataType, Map<String, EsField> properties, boolean aggregatable, boolean isAlias, EsField.TimeSeriesFieldType timeSeriesFieldType) EsField(String name, DataType esDataType, Map<String, EsField> properties, boolean aggregatable, EsField.TimeSeriesFieldType timeSeriesFieldType) EsField(StreamInput in) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe field typeReturns the path to the keyword version of this field if this field is text and it has a subfield that is indexed as keyword, throws an exception if such field is not found or the field name itself in all other cases.Returns andEsField.Exactobject with all the necessary info about the field: If it has an exact underlying field or not and if not an error message why it doesn'tgetName()Returns the simple name, but not the full field path.Returns list of properties for the nested and object fields, list of subfield if the field was indexed in a few different ways or null otherwisestatic Writeable.Reader<? extends EsField> This needs to be overridden by subclasses for specific serializationinthashCode()booleanThis field can be aggregatedbooleanisAlias()This field is an alias to another fieldstatic <A extends EsField>
AreadFrom(StreamInput in) protected static EsField.TimeSeriesFieldTypetoString()voidwriteContent(StreamOutput out) This needs to be overridden by subclasses for specific serializationprotected voidvoidwriteTo(StreamOutput out)
-
Constructor Details
-
EsField
-
EsField
-
EsField
-
EsField
-
EsField
- Throws:
IOException
-
-
Method Details
-
getReader
-
readFrom
- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
writeContent
This needs to be overridden by subclasses for specific serialization- Throws:
IOException
-
writeTimeSeriesFieldType
- Throws:
IOException
-
readTimeSeriesFieldType
protected static EsField.TimeSeriesFieldType readTimeSeriesFieldType(StreamInput in) throws IOException - Throws:
IOException
-
getWriteableName
This needs to be overridden by subclasses for specific serialization -
getName
Returns the simple name, but not the full field path. The latter requires knowing the path of the parent field. -
getDataType
The field type -
isAggregatable
public boolean isAggregatable()This field can be aggregated -
getProperties
Returns list of properties for the nested and object fields, list of subfield if the field was indexed in a few different ways or null otherwise -
isAlias
public boolean isAlias()This field is an alias to another field -
getExactField
Returns the path to the keyword version of this field if this field is text and it has a subfield that is indexed as keyword, throws an exception if such field is not found or the field name itself in all other cases. To avoid the exceptiongetExactInfo()should be used beforehand, to check if an exact field exists and if not get the errorMessage which explains why is that. -
getExactInfo
Returns andEsField.Exactobject with all the necessary info about the field:- If it has an exact underlying field or not
- and if not an error message why it doesn't
-
toString
-
equals
-
hashCode
public int hashCode()
-