用途:根据查询条件,获得查询记录数
依赖类:\x\Elasticsearch
方法名:count()
参数:无
返回值:失败返回false
,成功返回记录数int
。
使用示例:
$Elasticsearch = new \x\Elasticsearch();
$where = [
['title', '=', '骑士队', 'must'],
['title', '=', '利夫兰', 'filter'],
];
$res = $Elasticsearch->table('shop')->where($where)->count();
var_dump($res);