SolrCollapseFunction::setMax

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

説明

public SolrCollapseFunction SolrCollapseFunction::setMax(string $max)

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);

?>