|
...
|
...
|
@@ -297,10 +297,17 @@ class Es { |
|
|
|
* @time 2025/8/6 16:36
|
|
|
|
*/
|
|
|
|
public function bulk(BulkData $data){
|
|
|
|
|
|
|
|
$res = $this->client->bulk(['body'=>$data->toParams()]);
|
|
|
|
|
|
|
|
return $res->asArray();
|
|
|
|
try {
|
|
|
|
$res = $this->client->bulk(['body'=>$data->toParams()]);
|
|
|
|
|
|
|
|
return $res->asArray();
|
|
|
|
}catch (\Throwable $e){
|
|
|
|
return [
|
|
|
|
'errors' => [
|
|
|
|
$e->getMessage()
|
|
|
|
]
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
...
|
...
|
|