Class MappingParser

java.lang.Object
org.elasticsearch.index.mapper.MappingParser

public final class MappingParser extends Object
Parser for Mapping provided in CompressedXContent format
  • Method Details

    • checkNoRemainingFields

      public static void checkNoRemainingFields(String fieldName, Map<?,​?> fieldNodeMap)
      Verify that there are no remaining fields in the provided map that contained mapped fields
      Parameters:
      fieldName - the name of the field that is being parsed
      fieldNodeMap - the map of fields
    • checkNoRemainingFields

      public static void checkNoRemainingFields(Map<?,​?> fieldNodeMap, String message)
      Verify that there are no remaining fields in the provided map that contained mapped fields
      Parameters:
      fieldNodeMap - the map of fields
      message - the error message to be returned in case the provided map contains one or more fields
    • parse

      public Mapping parse(@Nullable String type, CompressedXContent source) throws MapperParsingException
      Throws:
      MapperParsingException
    • parse

      public Mapping parse(@Nullable String type, CompressedXContent source, String defaultSource) throws MapperParsingException
      Throws:
      MapperParsingException