Class InvalidMappedField

java.lang.Object
org.elasticsearch.xpack.esql.core.type.EsField
org.elasticsearch.xpack.esql.core.type.InvalidMappedField
All Implemented Interfaces:
Writeable

public class InvalidMappedField extends EsField
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.
  • Constructor Details

  • Method Details

    • types

      public Set<DataType> types()
    • writeContent

      public void writeContent(StreamOutput out) throws IOException
      Description copied from class: EsField
      This needs to be overridden by subclasses for specific serialization
      Overrides:
      writeContent in class EsField
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
      Description copied from class: EsField
      This needs to be overridden by subclasses for specific serialization
      Overrides:
      getWriteableName in class EsField
    • errorMessage

      public String errorMessage()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class EsField
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class EsField
    • getExactField

      public EsField getExactField()
      Description copied from class: EsField
      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 exception EsField.getExactInfo() should be used beforehand, to check if an exact field exists and if not get the errorMessage which explains why is that.
      Overrides:
      getExactField in class EsField
    • getExactInfo

      public EsField.Exact getExactInfo()
      Description copied from class: EsField
      Returns and EsField.Exact object 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:
      getExactInfo in class EsField
    • getTypesToIndices

      public Map<String,Set<String>> getTypesToIndices()
    • makeErrorsMessageIncludingInsistKeyword

      public static String makeErrorsMessageIncludingInsistKeyword(Map<String,Set<String>> typesToIndices)