We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db5b226 + 1325702 commit 87a77bdCopy full SHA for 87a77bd
Service/IndexService.php
@@ -318,6 +318,21 @@ public function getIndexDocumentCount(): int
318
return $results['count'];
319
}
320
321
+ public function count(Search $search, array $params = [])
322
+ {
323
+ $body = array_merge(
324
+ [
325
+ 'index' => $this->getIndexName(),
326
+ 'body' => $search->toArray(),
327
+ ],
328
+ $params
329
+ );
330
+
331
+ $results = $this->getClient()->count($body);
332
333
+ return $results['count'];
334
+ }
335
336
public function remove($id, $routing = null)
337
{
338
$params = [
0 commit comments