...
|
...
|
@@ -90,12 +90,25 @@ class Es { |
|
|
|
|
|
/**
|
|
|
* 统计数量
|
|
|
* @param array $param
|
|
|
* @param array $body
|
|
|
* @author:dc
|
|
|
* @time 2025/3/4 9:47
|
|
|
*/
|
|
|
public function count(array $param){
|
|
|
public function count(array $body){
|
|
|
|
|
|
$params = [
|
|
|
'index' => $this->getIndex(),
|
|
|
'body' => $body
|
|
|
];
|
|
|
|
|
|
try {
|
|
|
$response = $this->client->count($params);
|
|
|
}catch (\Throwable $e) {
|
|
|
logs("搜索数据es:".$e->getMessage());
|
|
|
return [];
|
|
|
}
|
|
|
|
|
|
return $response->asArray();
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
|