Added persistence logic of constructed index.