Skip to content

Commit 73531ac

Browse files
committed
withTrackTotalHits parameter handling
1 parent ffd8dd7 commit 73531ac

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Query/Builder.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2414,8 +2414,11 @@ public function withAnalyzer(string $analyzer): self
24142414
return $this;
24152415
}
24162416

2417-
public function withTrackTotalHits(bool $val): self
2417+
public function withTrackTotalHits(bool|int|null $val = true): self
24182418
{
2419+
if ($val === null) {
2420+
return $this;
2421+
}
24192422
$this->bodyParameters['track_total_hits'] = $val;
24202423

24212424
return $this;

0 commit comments

Comments
 (0)