fix stat repair & add search_index_fail to json stats