protected function commitIndex($index)
    {
        // Skip index if this is already complete
        $name = get_class($index);
        if (in_array($name, $this->completed)) {
            $this->addMessage("Skipping already comitted index {$name}");
            return;
        }

        // Bypass SolrIndex::commit exception handling so that queuedjobs can handle the error
        $this->addMessage("Committing index {$name}");
        $index->getService()->commit(false, false, false);
        $this->addMessage("Committing index {$name} was successful");

        // If this index is currently marked as dirty, it's now clean
        if (in_array($name, static::$dirty_indexes)) {
            static::$dirty_indexes = array_diff(static::$dirty_indexes, array($name));
        }

        // Mark complete
        $this->completed[] = $name;
    }