private function handleAutoCommit(): bool {
        $diff = count($this->indexedRes) - count($this->commitedRes);
        if ($diff >= $this->autoCommit && $this->autoCommit > 0) {
            echo self::$debug ? " + autocommit" : '';
            $this->fedora->commit();
            $this->commitedRes = $this->indexedRes;
            $this->fedora->begin();
            return true;
        }
        return false;
    }