(PECL solr >= 2.2.0)
Add a group sort field (group.sort parameter).
public SolrQuery SolrQuery::addGroupSortField ( string $field [, integer $order ] )
Allow sorting group documents, using group sort field (group.sort parameter).
Parameters:
field
Field name
order
Order ASC/DESC, utilizes SolrQuery::ORDER_* constants
Returns:
Examples:
SolrQuery::addGroupSortField() example
<?php $solrQuery = new SolrQuery('*:*'); $solrQuery ->setGroup(true) ->addGroupSortField('price', SolrQuery::ORDER_ASC); echo $solrQuery; ?>
The above example will output something similar to:
q=*:*&group=true&group.sort=price asc
See also:
SolrQuery::addGroupFunction() -
SolrQuery::setGroupNGroups() -
Please login to continue.