PHP 8.4.1 Released!

SolrCollapseFunction::setMax

(PECL solr >= 2.2.0)

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

Açıklama

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

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

Bağımsız Değişkenler

max

Dönen Değerler

SolrCollapseFunction

Örnekler

Örnek 1 SolrCollapseFunction::setMax() example

<?php

$func
= new SolrCollapseFunction('field_name');

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

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

$query->collapse($func);

?>
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top