array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'solrcollapsefunction.setmax.php', 1 => 'SolrCollapseFunction::setMax', 2 => 'Selects the group heads by the max value of a numeric field or function query', ), 'up' => array ( 0 => 'class.solrcollapsefunction.php', 1 => 'SolrCollapseFunction', ), 'prev' => array ( 0 => 'solrcollapsefunction.sethint.php', 1 => 'SolrCollapseFunction::setHint', ), 'next' => array ( 0 => 'solrcollapsefunction.setmin.php', 1 => 'SolrCollapseFunction::setMin', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/solr/solrcollapsefunction/setmax.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

SolrCollapseFunction::setMax

(PECL solr >= 2.2.0)

SolrCollapseFunction::setMaxSelects the group heads by the max value of a numeric field or function query

説明

public SolrCollapseFunction::setMax(string $max): SolrCollapseFunction

Selects the group heads by the max value of a numeric field or function query.

パラメータ

max

戻り値

SolrCollapseFunction

例1 SolrCollapseFunction::setMax() example

<?php

$func
= new SolrCollapseFunction('field_name');

$func->setMax('sum(cscore(),field(some_field))');

$query = new SolrQuery('*:*');

$query->collapse($func);

?>