Skip to content

Commit ffd8dd7

Browse files
author
Fabrizio Cau
committed
Add withTrackTotalHits method to Builder class to add track_total_hits in elasticsearch request body
1 parent 7a484df commit ffd8dd7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Query/Builder.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,6 +2414,13 @@ public function withAnalyzer(string $analyzer): self
24142414
return $this;
24152415
}
24162416

2417+
public function withTrackTotalHits(bool $val): self
2418+
{
2419+
$this->bodyParameters['track_total_hits'] = $val;
2420+
2421+
return $this;
2422+
}
2423+
24172424
// ----------------------------------------------------------------------
24182425
// Internal Operations
24192426
// ----------------------------------------------------------------------

0 commit comments

Comments
 (0)