

class CallableDict(dict):
    BASE = None
    OVERRIDES = None

    def __call__(self, overrides):
        new_dict = CallableDict(self)
        new_dict.OVERRIDES = overrides
        new_dict.BASE = self
        return new_dict


BASE_TYPE = {
    'store': False,
    'doc_values': False
}

STRING = CallableDict({
    'type': 'string',
    'index': 'analyzed'
})

FLOAT = CallableDict({
    'type': 'float'
})

DOUBLE = CallableDict({
    'type': 'double'
})

INTEGER = CallableDict({
    'type': 'integer'
})

LONG = CallableDict({
    'type': 'long'
})

SHORT = CallableDict({
    'type': 'short'
})

BYTE = CallableDict({
    'type': 'byte'
})

BOOLEAN = CallableDict({
    'type': 'boolean'
})

DATE = CallableDict({
    'type': 'date',
    'format': 'date'
})

DATETIME = CallableDict({
    'type': 'date',
    'format': 'date_hour_minute_second_fraction'
})


TYPES = {
    name: type
    for name, type in locals().items()
    if isinstance(type, CallableDict)
}



class CallableDict(dict):
    BASE = None
    OVERRIDES = None

    def __call__(self, overrides):
        new_dict = CallableDict(self)
        new_dict.OVERRIDES = overrides
        new_dict.BASE = self
        return new_dict


BASE_TYPE = {
    'store': False,
    'doc_values': False
}

STRING = CallableDict({
    'type': 'string',
    'index': 'analyzed'
})

FLOAT = CallableDict({
    'type': 'float'
})

DOUBLE = CallableDict({
    'type': 'double'
})

INTEGER = CallableDict({
    'type': 'integer'
})

LONG = CallableDict({
    'type': 'long'
})

SHORT = CallableDict({
    'type': 'short'
})

BYTE = CallableDict({
    'type': 'byte'
})

BOOLEAN = CallableDict({
    'type': 'boolean'
})

DATE = CallableDict({
    'type': 'date',
    'format': 'date'
})

TIME = CallableDict({
    'type': 'date',
    'format': 'time'
})

DATETIME = CallableDict({
    'type': 'date',
    'format': 'date_optional_time'
})


TYPES = {
    name: type
    for name, type in locals().items()
    if isinstance(type, CallableDict)
}

Switch default to actual ES default (date_optional_time) and add TIME type
Switch default to actual ES default (date_optional_time) and add TIME type

  
  
  class CallableDict(dict):
      BASE = None
      OVERRIDES = None
  
      def __call__(self, overrides):
          new_dict = CallableDict(self)
          new_dict.OVERRIDES = overrides
          new_dict.BASE = self
          return new_dict
  
  
  BASE_TYPE = {
      'store': False,
      'doc_values': False
  }
  
  STRING = CallableDict({
      'type': 'string',
      'index': 'analyzed'
  })
  
  FLOAT = CallableDict({
      'type': 'float'
  })
  
  DOUBLE = CallableDict({
      'type': 'double'
  })
  
  INTEGER = CallableDict({
      'type': 'integer'
  })
  
  LONG = CallableDict({
      'type': 'long'
  })
  
  SHORT = CallableDict({
      'type': 'short'
  })
  
  BYTE = CallableDict({
      'type': 'byte'
  })
  
  BOOLEAN = CallableDict({
      'type': 'boolean'
  })
  
  DATE = CallableDict({
      'type': 'date',
      'format': 'date'
  })
  
+ TIME = CallableDict({
+     'type': 'date',
+     'format': 'time'
+ })
+ 
  DATETIME = CallableDict({
      'type': 'date',
-     'format': 'date_hour_minute_second_fraction'
+     'format': 'date_optional_time'
  })
  
  
  TYPES = {
      name: type
      for name, type in locals().items()
      if isinstance(type, CallableDict)
  }
  
Switch default to actual ES default (date_optional_time) and add TIME type
## Code Before:


class CallableDict(dict):
    BASE = None
    OVERRIDES = None

    def __call__(self, overrides):
        new_dict = CallableDict(self)
        new_dict.OVERRIDES = overrides
        new_dict.BASE = self
        return new_dict


BASE_TYPE = {
    'store': False,
    'doc_values': False
}

STRING = CallableDict({
    'type': 'string',
    'index': 'analyzed'
})

FLOAT = CallableDict({
    'type': 'float'
})

DOUBLE = CallableDict({
    'type': 'double'
})

INTEGER = CallableDict({
    'type': 'integer'
})

LONG = CallableDict({
    'type': 'long'
})

SHORT = CallableDict({
    'type': 'short'
})

BYTE = CallableDict({
    'type': 'byte'
})

BOOLEAN = CallableDict({
    'type': 'boolean'
})

DATE = CallableDict({
    'type': 'date',
    'format': 'date'
})

DATETIME = CallableDict({
    'type': 'date',
    'format': 'date_hour_minute_second_fraction'
})


TYPES = {
    name: type
    for name, type in locals().items()
    if isinstance(type, CallableDict)
}

## Instruction:
Switch default to actual ES default (date_optional_time) and add TIME type
## Code After:


class CallableDict(dict):
    BASE = None
    OVERRIDES = None

    def __call__(self, overrides):
        new_dict = CallableDict(self)
        new_dict.OVERRIDES = overrides
        new_dict.BASE = self
        return new_dict


BASE_TYPE = {
    'store': False,
    'doc_values': False
}

STRING = CallableDict({
    'type': 'string',
    'index': 'analyzed'
})

FLOAT = CallableDict({
    'type': 'float'
})

DOUBLE = CallableDict({
    'type': 'double'
})

INTEGER = CallableDict({
    'type': 'integer'
})

LONG = CallableDict({
    'type': 'long'
})

SHORT = CallableDict({
    'type': 'short'
})

BYTE = CallableDict({
    'type': 'byte'
})

BOOLEAN = CallableDict({
    'type': 'boolean'
})

DATE = CallableDict({
    'type': 'date',
    'format': 'date'
})

TIME = CallableDict({
    'type': 'date',
    'format': 'time'
})

DATETIME = CallableDict({
    'type': 'date',
    'format': 'date_optional_time'
})


TYPES = {
    name: type
    for name, type in locals().items()
    if isinstance(type, CallableDict)
}
