<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.solrquery.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'solrquery.setgroupmain.php',
    1 => 'SolrQuery::setGroupMain',
    2 => 'If true, the result of the first field grouping command is used as the main result list in the response, using group.format=simple',
  ),
  'up' => 
  array (
    0 => 'class.solrquery.php',
    1 => 'SolrQuery',
  ),
  'prev' => 
  array (
    0 => 'solrquery.setgrouplimit.php',
    1 => 'SolrQuery::setGroupLimit',
  ),
  'next' => 
  array (
    0 => 'solrquery.setgroupngroups.php',
    1 => 'SolrQuery::setGroupNGroups',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/solr/solrquery/setgroupmain.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="solrquery.setgroupmain" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SolrQuery::setGroupMain</h1>
  <p class="verinfo">(PECL solr &gt;= 2.2.0)</p><p class="refpurpose"><span class="refname">SolrQuery::setGroupMain</span> &mdash; <span class="dc-title">If true, the result of the first field grouping command is used as the main result list in the response, using group.format=simple</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-solrquery.setgroupmain-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>SolrQuery::setGroupMain</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$value</code></span>): <span class="type"><a href="class.solrquery.php" class="type SolrQuery">SolrQuery</a></span></div>

  <p class="para rdfs-comment">
    If <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, the result of the first field grouping command is used as the main result list in the response, using <code class="literal">group.format=simple</code>.
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-solrquery.setgroupmain-parameters">
  <h3 class="title">参数</h3>
  <dl>
   
    <dt><code class="parameter">value</code></dt>
    <dd>
     <p class="para">
      If <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, the result of the first field grouping command is used as the main result list in the response.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-solrquery.setgroupmain-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an instance of <span class="classname"><a href="class.solrquery.php" class="classname">SolrQuery</a></span>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-solrquery.setgroupmain-seealso">
  <h3 class="title">参见</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="solrquery.setgroup.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroup()</a> - Enable/Disable result grouping (group parameter)</span></li>
   <li><span class="methodname"><a href="solrquery.addgroupfield.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::addGroupField()</a> - Add a field to be used to group results</span></li>
   <li><span class="methodname"><a href="solrquery.addgroupfunction.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::addGroupFunction()</a> - Allows grouping results based on the unique values of a function query (group.func parameter)</span></li>
   <li><span class="methodname"><a href="solrquery.addgroupquery.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::addGroupQuery()</a> - Allows grouping of documents that match the given query</span></li>
   <li><span class="methodname"><a href="solrquery.addgroupsortfield.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::addGroupSortField()</a> - Add a group sort field (group.sort parameter)</span></li>
   <li><span class="methodname"><a href="solrquery.setgroupfacet.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroupFacet()</a> - Sets group.facet parameter</span></li>
   <li><span class="methodname"><a href="solrquery.setgroupoffset.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroupOffset()</a> - Sets the group.offset parameter</span></li>
   <li><span class="methodname"><strong>SolrQuery::setGroupMain()</strong></span></li>
   <li><span class="methodname"><a href="solrquery.setgroupngroups.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroupNGroups()</a> - If true, Solr includes the number of groups that have matched the query in the results</span></li>
   <li><span class="methodname"><a href="solrquery.setgrouptruncate.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroupTruncate()</a> - If true, facet counts are based on the most relevant document of each group matching the query</span></li>
   <li><span class="methodname"><a href="solrquery.setgroupformat.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroupFormat()</a> - Sets the group format, result structure (group.format parameter)</span></li>
   <li><span class="methodname"><a href="solrquery.setgroupcachepercent.php" class="methodname" rel="rdfs-seeAlso">SolrQuery::setGroupCachePercent()</a> - Enables caching for result grouping</span></li>
  </ul>
 </div>

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