SolrQuery::addSortField

(PECL solr >= 0.9.2)

SolrQuery::addSortFieldUsed to control how the results should be sorted

说明

public SolrQuery::addSortField ( string $field [, int $order = SolrQuery::ORDER_DESC ] ) : SolrQuery

Used to control how the results should be sorted.

参数

field

The name of the field

order

The sort direction. This should be either SolrQuery::ORDER_ASC or SolrQuery::ORDER_DESC.

返回值

Returns the current SolrQuery object.

相关文章
php mcve 函数 returns array of strings which represents the keys that can be used for response parameters on this transactionphp svn 函数 creates and returns a stream that will be used to replacephp harudoc set how pages should be displayedphp harudoc set how the document should be displayedphp harupage set the shape to be used at the ends of linesphp imagickdraw set the polygon fill rule to be used by the clipping pathphp mongocursor if this query should fetch partial results from mongos if a shard is downphp soapserver sets the object which will be used to handle soap requestsphp solrquery add a field to be used to group resultsphp solrquery used to control how the results should be sortedphp solrquery requests a return of sub results for values within the given facetphp solrquery returns the maximum number of constraint counts that should be returned for the facet fieldsphp solrquery returns the minimum counts for facet fields should be included in the responsephp solrquery returns an offset into the list of constraints to be used for paginationphp solrquery returns whether or not morelikethis results should be enabledphp solrquery returns the maximum number of query terms that will be included in any generated queryphp solrquery returns an integer indicating how terms are sortedphp solrquery specifies the number of results to return for each group. the server default value is 1php solrquery exclude the header from the returned resultsphp solrquery specifies how to sort the returned terms
关注编程学问公众号