#NEWLINE# def _get_index_stats( self ) : #NEWLINE# #INDENT# '\n        Populate `index_info` with index `size_in_bytes` and doc count\n        information for each index.\n        ' #NEWLINE# self . loggit . debug ( 'Getting index stats' ) #NEWLINE# self . empty_list_check ( ) #NEWLINE# def iterate_over_stats( stats ) : #NEWLINE# #INDENT# for index in stats [ 'indices' ] : #NEWLINE# #INDENT# size = stats [ 'indices' ] [ index ] [ 'total' ] [ 'store' ] [ 'size_in_bytes' ] #NEWLINE# docs = stats [ 'indices' ] [ index ] [ 'total' ] [ 'docs' ] [ 'count' ] #NEWLINE# self . loggit . debug ( 'Index: {0}  Size: {1}  Docs: {2}' . format ( index , byte_size ( size ) , docs ) ) #NEWLINE# self . index_info [ index ] [ 'size_in_bytes' ] = size #NEWLINE# self . index_info [ index ] [ 'docs' ] = docs #NEWLINE# #UNINDENT# #UNINDENT# working_list = self . working_list ( ) #NEWLINE# for index in self . working_list ( ) : #NEWLINE# #INDENT# if ( iterate_over_stats . index_info [ index ] [ 'state' ] == 'close' ) : #NEWLINE# #INDENT# working_list . remove ( index ) #NEWLINE# #UNINDENT# #UNINDENT# if working_list : #NEWLINE# #INDENT# index_lists = chunk_index_list ( working_list ) #NEWLINE# for l in index_lists : #NEWLINE# #INDENT# iterate_over_stats ( self . client . indices . stats ( index = to_csv ( l ) , metric = 'store,docs' ) )