Class InvalidMappedField
java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
org.elasticsearch.xpack.esql.core.type.InvalidMappedField
- All Implemented Interfaces:
Writeable
Representation of field mapped differently across indices.
Used during mapping discovery only.
Note that the field
typesToIndices is not serialized because that information is
not required through the cluster, only surviving as long as the Analyser phase of query planning.
It is used specifically for the 'union types' feature in ES|QL.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.esql.core.type.EsField
EsField.ExactNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
ConstructorsModifierConstructorDescriptionInvalidMappedField(String name, String errorMessage) Constructor supporting union types, used in ES|QL.protected -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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'tThis needs to be overridden by subclasses for specific serializationinthashCode()types()voidwriteContent(StreamOutput out) This needs to be overridden by subclasses for specific serializationMethods inherited from class org.elasticsearch.xpack.esql.core.type.EsField
getDataType, getName, getProperties, getReader, isAggregatable, isAlias, readFrom, toString, writeTo
-
Constructor Details
-
InvalidMappedField
-
InvalidMappedField
-
InvalidMappedField
Constructor supporting union types, used in ES|QL. -
InvalidMappedField
- Throws:
IOException
-
-
Method Details
-
types
-
writeContent
Description copied from class:EsFieldThis needs to be overridden by subclasses for specific serialization- Overrides:
writeContentin classEsField- Throws:
IOException
-
getWriteableName
Description copied from class:EsFieldThis needs to be overridden by subclasses for specific serialization- Overrides:
getWriteableNamein classEsField
-
errorMessage
-
hashCode
public int hashCode() -
equals
-
getExactField
Description copied from class:EsFieldReturns 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 exceptionEsField.getExactInfo()should be used beforehand, to check if an exact field exists and if not get the errorMessage which explains why is that.- Overrides:
getExactFieldin classEsField
-
getExactInfo
Description copied from class:EsFieldReturns 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
- Overrides:
getExactInfoin classEsField
-
getTypesToIndices
-