SolrQuery
PHP Manual

SolrQuery::addGroupSortField

(PECL solr >= 2.2.0)

SolrQuery::addGroupSortFieldAdd 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).

パラメータ

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
PHP Manual