handle rebuildIndex