clear the index before re-creating it