略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: SolrCollapseFunction::setMax

2024-12-22

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

范例

示例 #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 noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/solrcollapsefunction.setmax.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3