Class RuntimeFieldType

java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.RuntimeFieldType
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentFragment

public abstract class RuntimeFieldType
extends MappedFieldType
implements org.elasticsearch.common.xcontent.ToXContentFragment
Base implementation for a runtime field that can be defined as part of the runtime section of the index mappings
  • Constructor Details

    • RuntimeFieldType

      protected RuntimeFieldType​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.String> meta)
  • Method Details

    • toXContent

      public final org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • doXContentBody

      protected abstract void doXContentBody​(org.elasticsearch.common.xcontent.XContentBuilder builder, boolean includeDefaults) throws java.io.IOException
      Prints out the parameters that subclasses expose
      Throws:
      java.io.IOException
    • parseRuntimeFields

      public static java.util.Map<java.lang.String,​RuntimeFieldType> parseRuntimeFields​(java.util.Map<java.lang.String,​java.lang.Object> node, Mapper.TypeParser.ParserContext parserContext, boolean supportsRemoval)
      Parse runtime fields from the provided map, using the provided parser context.
      Parameters:
      node - the map that holds the runtime fields configuration
      parserContext - the parser context that holds info needed when parsing mappings
      supportsRemoval - whether a null value for a runtime field should be properly parsed and translated to the removal of such runtime field
      Returns:
      the parsed runtime fields