PHP - Manual: SolrCollapseFunction::setMax
2024-12-21
(PECL solr >= 2.2.0)
SolrCollapseFunction::setMax — Selects the group heads by the max value of a numeric field or function query
Selects the group heads by the max value of a numeric field or function query.
max
示例 #1 SolrCollapseFunction::setMax() example
<?php
$func = new SolrCollapseFunction('field_name');
$func->setMax('sum(cscore(),field(some_field))');
$query = new SolrQuery('*:*');
$query->collapse($func);
?>
官方地址:https://www.php.net/manual/en/solrcollapsefunction.setmax.php