<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.solrdocument.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'solrdocument.sort.php',
    1 => 'SolrDocument::sort',
    2 => 'Sorts the fields in the document',
  ),
  'up' => 
  array (
    0 => 'class.solrdocument.php',
    1 => 'SolrDocument',
  ),
  'prev' => 
  array (
    0 => 'solrdocument.set.php',
    1 => 'SolrDocument::__set',
  ),
  'next' => 
  array (
    0 => 'solrdocument.toarray.php',
    1 => 'SolrDocument::toArray',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/solr/solrdocument/sort.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="solrdocument.sort" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SolrDocument::sort</h1>
  <p class="verinfo">(PECL solr &gt;= 0.9.2)</p><p class="refpurpose"><span class="refname">SolrDocument::sort</span> &mdash; <span class="dc-title">Sorts the fields in the document</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-solrdocument.sort-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SolrDocument::sort</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$sortOrderBy</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$sortDirection</code><span class="initializer"> = SolrDocument::SORT_ASC</span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
 <div class="descriptioncode"><pre class="descriptioncode">The fields are rearranged according to the specified criteria and sort direction
   
   Fields can be sorted by boost values, field names and number of values.
   
   The sortOrderBy parameter must be one of :
   
   * SolrDocument::SORT_FIELD_NAME
   * SolrDocument::SORT_FIELD_BOOST_VALUE
   * SolrDocument::SORT_FIELD_VALUE_COUNT
   
   The sortDirection can be one of :
   
   * SolrDocument::SORT_DEFAULT
   * SolrDocument::SORT_ASC
   * SolrDocument::SORT_DESC
   
   The default way is to sort in ascending order.</pre>
</div>
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-solrdocument.sort-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">sortOrderBy</code></dt>
     <dd>
      <p class="para">
       The sort criteria.
      </p>
     </dd>
    
    
     <dt><code class="parameter">sortDirection</code></dt>
     <dd>
      <p class="para">
       The sort direction.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-solrdocument.sort-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


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