fix delete method to delete search-index