#NEWLINE# def read_stats( self ) : #NEWLINE# #INDENT# '\n        Reads the index-wide stats.\n\n        If the stats do not exist, it makes returns data with the current\n        version of ``microsearch`` & zero docs (used in scoring).\n        ' #NEWLINE# if ( not os . path . exists ( self . stats_path ) ) : #NEWLINE# #INDENT# return { #NEWLINE# #INDENT# 'version' : '.' . join ( [ str ( bit ) for bit in __version__ ] ) , #NEWLINE# 'total_docs' : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# with open ( self . stats_path , 'r' ) as stats_file : #NEWLINE# #INDENT# return json . load ( stats_file )