Class FieldMapper

    • Method Detail

      • name

        public java.lang.String name()
        Description copied from class: Mapper
        Returns the canonical name which uniquely identifies the mapper against other mappers in a type.
        Specified by:
        name in class Mapper
      • typeName

        public java.lang.String typeName()
        Description copied from class: Mapper
        Returns a name representing the the type of this mapper.
        Specified by:
        typeName in class Mapper
      • copyTo

        public FieldMapper.CopyTo copyTo()
        List of fields where this field should be copied to
      • parse

        public void parse​(ParseContext context)
                   throws java.io.IOException
        Parse the field value using the provided ParseContext.
        Throws:
        java.io.IOException
      • parseCreateField

        protected abstract void parseCreateField​(ParseContext context,
                                                 java.util.List<org.apache.lucene.index.IndexableField> fields)
                                          throws java.io.IOException
        Parse the field value and populate fields.
        Throws:
        java.io.IOException
      • createFieldNamesField

        protected void createFieldNamesField​(ParseContext context,
                                             java.util.List<org.apache.lucene.index.IndexableField> fields)
      • iterator

        public java.util.Iterator<Mapper> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Mapper>
      • clone

        protected FieldMapper clone()
        Overrides:
        clone in class java.lang.Object
      • merge

        public FieldMapper merge​(Mapper mergeWith,
                                 boolean updateAllTypes)
        Description copied from class: Mapper
        Return the merge of mergeWith into this. Both this and mergeWith will be left unmodified.
        Specified by:
        merge in class Mapper
      • doMerge

        protected void doMerge​(Mapper mergeWith,
                               boolean updateAllTypes)
        Merge changes coming from mergeWith in place.
        Parameters:
        updateAllTypes - TODO
      • updateFieldType

        public FieldMapper updateFieldType​(java.util.Map<java.lang.String,​MappedFieldType> fullNameToFieldType)
        Description copied from class: Mapper
        Update the field type of this mapper. This is necessary because some mapping updates can modify mappings across several types. This method must return a copy of the mapper so that the current mapper is not modified.
        Specified by:
        updateFieldType in class Mapper
      • doXContentBody

        protected void doXContentBody​(XContentBuilder builder,
                                      boolean includeDefaults,
                                      ToXContent.Params params)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • doXContentAnalyzers

        protected final void doXContentAnalyzers​(XContentBuilder builder,
                                                 boolean includeDefaults)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • doXContentDocValues

        protected void doXContentDocValues​(XContentBuilder builder,
                                           boolean includeDefaults)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • indexOptionToString

        protected static java.lang.String indexOptionToString​(org.apache.lucene.index.IndexOptions indexOption)
      • termVectorOptionsToString

        public static java.lang.String termVectorOptionsToString​(org.apache.lucene.document.FieldType fieldType)
      • contentType

        protected abstract java.lang.String contentType()