function optimize( $withCommit = false )
    {

        if ( $this->UseMultiLanguageCores === true )
        {
            foreach ( $this->SolrLanguageShards as $shard )
            {
                $shard->optimize( $withCommit );
            }
        }
        else
        {
            $this->Solr->optimize( $withCommit );
        }
    }