Skip to content

Commit 6d40f3c

Browse files
authored
Merge pull request #11 from olekjs/dev-release-v1.8.1
Fix count method
2 parents 66cadab + 330c6c0 commit 6d40f3c

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)