Added refresh and flush methods for index