PHP 8.4.0 RC4 available for testing

SolrQuery::addGroupSortField

(PECL solr >= 2.2.0)

SolrQuery::addGroupSortFieldAdd a group sort field (group.sort parameter)

Açıklama

public SolrQuery::addGroupSortField(string $field, int $order = ?): SolrQuery

Allow sorting group documents, using group sort field (group.sort parameter).

Bağımsız Değişkenler

field

Field name

order

Order ASC/DESC, utilizes SolrQuery::ORDER_* constants

Dönen Değerler

Örnekler

Örnek 1 SolrQuery::addGroupSortField() example

<?php

$solrQuery
= new SolrQuery('*:*');
$solrQuery
->setGroup(true)
->
addGroupSortField('price', SolrQuery::ORDER_ASC);

echo
$solrQuery;
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

q=*:*&group=true&group.sort=price asc

Ayrıca Bakınız

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top