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

范例

Example #1 SolrCollapseFunction::setMax() example

<?php

$func 
= new SolrCollapseFunction('field_name');

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

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

$query->collapse($func);

?>
相关文章
php sequence updates all values by applying a callback function to each valuephp cubrid 函数 get the query timeout value of the requestphp dbx 函数 sort a result from a dbx query by a custom sort functionphp ingres 函数 get the type of a field in a query resultphp session pgsql 函数 get custom field valuephp session pgsql 函数 set custom field valuephp uopz 函数 gets a previous set return value for a functionphp uopz 函数 unsets a previously set return value for a functionphp intlcalendar the minimum value for a field considering the objectʼs current timephp mysql xdevapi collectionmodify bind value to query placeholderphp solrcollapsefunction selects the group heads by the max value of a numeric field or function queryphp solrcollapsefunction sets the initial size of the collapse data structures when collapsing on a numeric field onlyphp solrcollapsefunction sets the initial size of the collapse data structures when collapsing on a numeric field onlyphp solrcollapsefunction returns a string representing the constructed collapse functionphp solrdismaxquery adds a boost query field with value and optional boost bq parameter php solrinputdocument retrieves the boost value for a particular fieldphp solrquery allows grouping results based on the unique values of a function query group.func parameter php solrquery returns group cache percent valuephp solrquery returns the group.facet parameter valuephp solrquery specifies the number of results to return for each group. the server default value is 1
关注编程学问公众号