Skip to content

Commit 330c6c0

Browse files
author
Olek Kaim
committed
Fix count method
1 parent 66cadab commit 330c6c0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Client.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ public function decrement(string $index, string|int $id, string $field, int $val
275275
*/
276276
public function count(string $index, array $data = []): int
277277
{
278+
if (isset($data['_source'])) {
279+
unset($data['_source']);
280+
}
281+
278282
if (empty($data)) {
279283
$data = [
280284
'query' => [

0 commit comments

Comments
 (0)