added functionality to delete documents from indexes