SolrQuery::addGroupSortField
Add a group sort field (group.sort parameter)
説明
public SolrQuery SolrQuery::addGroupSortField(string $field
, int $order
= ?)
パラメータ
-
field
-
Field name
-
order
-
Order ASC/DESC, utilizes SolrQuery::ORDER_* constants
例
例1 SolrQuery::addGroupSortField example
<?php
$solrQuery = new SolrQuery('*:*');
$solrQuery
->setGroup(true)
->addGroupSortField('price', SolrQuery::ORDER_ASC);
echo $solrQuery;
?>
q=*:*&group=true&group.sort=price asc
参考
- SolrQuery::setGroup
- SolrQuery::addGroupField
- SolrQuery::addGroupFunction
- SolrQuery::addGroupQuery
- SolrQuery::setGroupFacet
- SolrQuery::setGroupOffset
- SolrQuery::setGroupLimit
- SolrQuery::setGroupMain
- SolrQuery::setGroupNGroups
- SolrQuery::setGroupTruncate
- SolrQuery::setGroupFormat
- SolrQuery::setGroupCachePercent