#NEWLINE# def _get_field_stats_dates( self , field = '@timestamp' ) : #NEWLINE# #INDENT# '\n        Add indices to `index_info` based on the value the stats api returns,\n        as determined by `field`\n\n        :arg field: The field with the date value.  The field must be mapped in\n            elasticsearch as a date datatype.  Default: ``@timestamp``\n        ' #NEWLINE# self . loggit . debug ( 'Getting index date from field_stats API' ) #NEWLINE# self . loggit . info ( 'Cannot use field_stats on closed indices.  Omitting any closed indices.' ) #NEWLINE# self . filter_closed ( ) #NEWLINE# index_lists = chunk_index_list ( self . indices ) #NEWLINE# for l in index_lists : #NEWLINE# #INDENT# working_list = self . client . field_stats ( index = to_csv ( l ) , fields = field , level = 'indices' ) [ 'indices' ] #NEWLINE# if working_list : #NEWLINE# #INDENT# for index in list ( working_list . keys ( ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# s = working_list . index_info [ index ] [ 'age' ] #NEWLINE# wl = working_list [ index ] [ 'fields' ] [ field ] #NEWLINE# s [ 'min_value' ] = fix_epoch ( wl [ 'min_value' ] ) #NEWLINE# s [ 'max_value' ] = fix_epoch ( wl [ 'max_value' ] ) #NEWLINE# #UNINDENT# except KeyError as e : #NEWLINE# #INDENT# raise ActionError ( 'Field "{0}" not found in index "{1}"' . format ( field , index ) )