Class LeafRuntimeField

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

public final class LeafRuntimeField extends Object implements RuntimeField
RuntimeField base class for leaf fields that will only ever return a single MappedFieldType from RuntimeField.asMappedFieldTypes(). Can be a standalone runtime field, or part of a composite.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.RuntimeField

    RuntimeField.Builder, RuntimeField.Parser

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    LeafRuntimeField​(String name, MappedFieldType mappedFieldType, List<FieldMapper.Parameter<?>> parameters)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Exposes the MappedFieldTypes backing this runtime field, used to execute queries, run aggs etc.
    Exposes the name of the runtime field
    org.elasticsearch.common.xcontent.XContentBuilder
    toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment

    isFragment
  • Constructor Details

  • Method Details

    • name

      public String name()
      Description copied from interface: RuntimeField
      Exposes the name of the runtime field
      Specified by:
      name in interface RuntimeField
      Returns:
      name of the field
    • asMappedFieldTypes

      public Stream<MappedFieldType> asMappedFieldTypes()
      Description copied from interface: RuntimeField
      Exposes the MappedFieldTypes backing this runtime field, used to execute queries, run aggs etc.
      Specified by:
      asMappedFieldTypes in interface RuntimeField
      Returns:
      the MappedFieldTypes backing this runtime field
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      IOException