If the index file is empty then index is rebuilded