用途:指定需要排序的字段规则。
依赖类:\x\Elasticsearch
方法名:order()
参数:
string|array $order
返回值:this
使用示例:
$Elasticsearch = new \x\Elasticsearch();
// 使用场景:字符串
$Elasticsearch->table('shop')->order('id DESC, title ASC');
// 使用场景:数组
$Elasticsearch->table('shop')->order(['id', 'DESC'])->order(['id', 'ASC']);