conditional reindex