The current purgeIndexEntries assumes that the rowIds are consecutive and belong to the same file, which is incorrect and needs to be fixed.