Package org.elasticsearch.index.mapper
Class ParseContext
java.lang.Object
org.elasticsearch.index.mapper.ParseContext
- Direct Known Subclasses:
ParseContext.InternalParseContext
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddDoc(LuceneDocument doc)abstract voidaddDynamicMapper(Mapper update)Add a new mapper dynamically created while parsing.abstract voidaddDynamicRuntimeField(RuntimeField runtimeField)Add a new runtime field dynamically created while parsing.abstract voidaddIgnoredField(String field)Add the givenfieldto the set of ignored fields.abstract voidaddToFieldNames(String field)Add the givenfieldto the _field_names field Use this if an exists query run against the field cannot use docvalues or norms.Return a new context that will be within a copy-to operation.Return a new context that will be within multi-fields.createNestedContext(String fullPath)Return a new context that will be used within a nested document.abstract LuceneDocumentdoc()abstract List<LuceneDocument>docs()abstract MappingParserContextdynamicTemplateParserContext(DateFormatter dateFormatter)findDynamicTemplate(String fieldName, DynamicTemplate.XContentFieldType matchType)Find a dynamic mapping template for the given field and its matching typeGet dynamic mappers created while parsing.abstract List<RuntimeField>Get dynamic runtime fields created while parsing.abstract Collection<String>Return the collection of fields to be added to the _field_names fieldabstract Collection<String>Return the collection of fields that have been ignored so far.abstract MetadataFieldMappergetMetadataMapper(String mapperName)abstract ObjectMappergetObjectMapper(String name)abstract IndexAnalyzersabstract IndexSettingsbooleanbooleanabstract MappingLookupabstract Iterable<LuceneDocument>Returns an Iterable over all non-root documents.overridePath(ContentPath path)Return a new context that will have the provided path.abstract org.elasticsearch.common.xcontent.XContentParserparser()abstract ContentPathpath()abstract RootObjectMapperroot()abstract LuceneDocumentrootDoc()abstract SeqNoFieldMapper.SequenceIDFieldsseqID()abstract voidabstract SourceToParseswitchDoc(LuceneDocument document)Return a new context that has the provided document as the current document.switchParser(org.elasticsearch.common.xcontent.XContentParser parser)Deprecated.we are actively deprecating and removing the ability to pass complex objects to multifields, so try and avoid using this methodabstract org.apache.lucene.document.Fieldversion()abstract voidversion(org.apache.lucene.document.Field version)
-
Constructor Details
-
ParseContext
public ParseContext()
-
-
Method Details
-
nonRootDocuments
Returns an Iterable over all non-root documents. If there are no non-root documents the iterable will return an empty iterator. -
addIgnoredField
Add the givenfieldto the set of ignored fields. -
getIgnoredFields
Return the collection of fields that have been ignored so far. -
addToFieldNames
Add the givenfieldto the _field_names field Use this if an exists query run against the field cannot use docvalues or norms. -
getFieldNames
Return the collection of fields to be added to the _field_names field -
dynamicTemplateParserContext
-
createCopyToContext
Return a new context that will be within a copy-to operation. -
isWithinCopyTo
public boolean isWithinCopyTo() -
createMultiFieldContext
Return a new context that will be within multi-fields. -
createNestedContext
Return a new context that will be used within a nested document. -
switchDoc
Return a new context that has the provided document as the current document. -
overridePath
Return a new context that will have the provided path. -
switchParser
@Deprecated public final ParseContext switchParser(org.elasticsearch.common.xcontent.XContentParser parser)Deprecated.we are actively deprecating and removing the ability to pass complex objects to multifields, so try and avoid using this method -
isWithinMultiFields
public boolean isWithinMultiFields() -
indexSettings
-
sourceToParse
-
path
-
parser
public abstract org.elasticsearch.common.xcontent.XContentParser parser() -
rootDoc
-
docs
-
doc
-
addDoc
-
root
-
mappingLookup
-
getMetadataMapper
-
indexAnalyzers
-
version
public abstract org.apache.lucene.document.Field version() -
version
public abstract void version(org.apache.lucene.document.Field version) -
seqID
-
seqID
-
addDynamicMapper
Add a new mapper dynamically created while parsing. -
getObjectMapper
-
getDynamicMappers
Get dynamic mappers created while parsing. -
addDynamicRuntimeField
Add a new runtime field dynamically created while parsing. -
getDynamicRuntimeFields
Get dynamic runtime fields created while parsing. -
findDynamicTemplate
public final DynamicTemplate findDynamicTemplate(String fieldName, DynamicTemplate.XContentFieldType matchType)Find a dynamic mapping template for the given field and its matching type- Parameters:
fieldName- the name of the fieldmatchType- the expecting matchType of the field- Returns:
- the matching template; otherwise returns null
- Throws:
MapperParsingException- if the given field has a dynamic template name specified, but no template matches that name.
-