<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.solrclient.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'tr',
  ),
  'this' => 
  array (
    0 => 'solrclient.optimize.php',
    1 => 'SolrClient::optimize',
    2 => 'Defragments the index',
  ),
  'up' => 
  array (
    0 => 'class.solrclient.php',
    1 => 'SolrClient',
  ),
  'prev' => 
  array (
    0 => 'solrclient.getoptions.php',
    1 => 'SolrClient::getOptions',
  ),
  'next' => 
  array (
    0 => 'solrclient.ping.php',
    1 => 'SolrClient::ping',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/solr/solrclient/optimize.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="solrclient.optimize" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SolrClient::optimize</h1>
  <p class="verinfo">(PECL solr &gt;= 0.9.2)</p><p class="refpurpose"><span class="refname">SolrClient::optimize</span> &mdash; <span class="dc-title">Defragments the index</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-solrclient.optimize-description">
  <h3 class="title">Açıklama</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SolrClient::optimize</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$maxSegments</code><span class="initializer"> = 1</span></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$softCommit</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></span></span>, <span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$waitSearcher</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></span></span>): <span class="type"><a href="class.solrupdateresponse.php" class="type SolrUpdateResponse">SolrUpdateResponse</a></span></div>

  <p class="para rdfs-comment">
   Defragments the index for faster search performance.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-solrclient.optimize-parameters">
  <h3 class="title">Bağımsız Değişkenler</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">maxSegments</code></dt>
     <dd>
      <p class="para">
       Optimizes down to at most this number of segments. Since Solr 1.3
      </p>
     </dd>
    
    
     <dt><code class="parameter">softCommit</code></dt>
     <dd>
      <p class="para">
       This will refresh the &#039;view&#039; of the index in a more performant manner, but without &quot;on-disk&quot; guarantees. (Solr4.0+)
      </p>
     </dd>
    
    
     <dt><code class="parameter">waitSearcher</code></dt>
     <dd>
      <p class="para">
       Block until a new searcher is opened and registered as the main query searcher, making the changes visible. 
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-solrclient.optimize-returnvalues">
  <h3 class="title">Dönen Değerler</h3>
  <p class="para">
   Returns a SolrUpdateResponse on success or throws an exception on failure.
  </p>
 </div>

 
 <div class="refsect1 errors" id="refsect1-solrclient.optimize-errors">
  <h3 class="title">Hatalar/İstisnalar</h3>
  <p class="para">
   Throws <span class="classname"><a href="class.solrclientexception.php" class="classname">SolrClientException</a></span> if the client had failed, or there was a connection issue.
  </p>
  <p class="para">
   Throws <span class="classname"><a href="class.solrserverexception.php" class="classname">SolrServerException</a></span> if the Solr Server had failed to process the request.
  </p>
 </div>

 
 <div class="refsect1 notes" id="refsect1-solrclient.optimize-notes">
  <h3 class="title">Notlar</h3>
  <div class="warning"><strong class="warning">Uyarı</strong>
   <p class="para">
    PECL Solr &gt;= 2.0 only supports Solr Server &gt;= 4.0 
   </p>
   <p class="para">
    Prior to PECL Solr 2.0 this method used to accept these arguments &quot;int $maxSegments, bool $waitFlush, bool $waitSearcher&quot;.
   </p>
  </div>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-solrclient.optimize-seealso">
  <h3 class="title">Ayrıca Bakınız</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="methodname"><a href="solrclient.commit.php" class="methodname" rel="rdfs-seeAlso">SolrClient::commit()</a> - Finalizes all add/deletes made to the index</span></li>
    <li><span class="methodname"><a href="solrclient.rollback.php" class="methodname" rel="rdfs-seeAlso">SolrClient::rollback()</a> - Rollbacks all add/deletes made to the index since the last commit</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>