private function commit() { if ($this->hasBulk()) { $this->flushBulk(); $this->client->refreshAll(); } }