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 harudoc set how pages should be displayedphp harudoc set how the document should be displayedphp imagickdraw set the polygon fill rule to be used by the clipping pathphp mongogridfsfile returns a resource that can be used to read the stored filephp phar defines a list of up to 4 $ server variables that should be modified for executionphp 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 word length above which words will be ignoredphp solrquery returns the treshold frequency at which words will be ignored which do not occur in at least this many docsphp solrquery returns the maximum number of terms solr should returnphp solrquery returns an integer indicating how terms are sortedphp solrquery removes one of the fields used for highlightingphp solrquery if true the result of the first field grouping command is used as the main result list in the response using group.format=simplephp solrquery if true solr includes the number of groups that have matched the query in the results
关注编程学问公众号