Class MappingParser

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

public final class MappingParser
extends java.lang.Object
Parser for Mapping provided in CompressedXContent format
  • Method Summary

    Modifier and Type Method Description
    static void checkNoRemainingFields​(java.lang.String fieldName, java.util.Map<?,​?> fieldNodeMap)
    Verify that there are no remaining fields in the provided map that contained mapped fields
    static void checkNoRemainingFields​(java.util.Map<?,​?> fieldNodeMap, java.lang.String message)
    Verify that there are no remaining fields in the provided map that contained mapped fields
    Mapping parse​(java.lang.String type, CompressedXContent source)  
    Mapping parse​(java.lang.String type, CompressedXContent source, java.lang.String defaultSource)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • checkNoRemainingFields

      public static void checkNoRemainingFields​(java.lang.String fieldName, java.util.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​(java.util.Map<?,​?> fieldNodeMap, java.lang.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 java.lang.String type, CompressedXContent source) throws MapperParsingException
      Throws:
      MapperParsingException
    • parse

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