Package org.elasticsearch.index.mapper
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RuntimeFieldType.Parser
Parser for a runtime field.Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.CollapseType, MappedFieldType.Relation
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 Modifier Constructor Description protected
RuntimeFieldType(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> meta)
-
Method Summary
Modifier and Type Method Description protected abstract void
doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, boolean includeDefaults)
Prints out the parameters that subclasses exposestatic 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.org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
Methods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, collapseType, distanceFeatureQuery, docValueFormat, eagerGlobalOrdinals, existsQuery, extractTerm, failIfNoDocValues, failIfNotIndexed, familyTypeName, fielddataBuilder, fuzzyQuery, getTextSearchInfo, hasDocValues, intervals, isAggregatable, isFieldWithinQuery, isSearchable, isStored, meta, multiPhraseQuery, name, phrasePrefixQuery, phraseQuery, pointReaderIfPossible, prefixQuery, prefixQuery, rangeQuery, regexpQuery, setBoost, setEagerGlobalOrdinals, spanPrefixQuery, termQuery, termQueryCaseInsensitive, termsQuery, typeName, valueFetcher, valueForDisplay, wildcardQuery, wildcardQuery
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
-
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 interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-
doXContentBody
protected abstract void doXContentBody(org.elasticsearch.common.xcontent.XContentBuilder builder, boolean includeDefaults) throws java.io.IOExceptionPrints 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 configurationparserContext
- the parser context that holds info needed when parsing mappingssupportsRemoval
- 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
-