From 886b116d4a160a99a659d487d4b5cc3236e70765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Michael=20O=2E=20Hegg=C3=B8?= Date: Tue, 5 Sep 2023 11:01:09 +0200 Subject: [PATCH] Set track_total_hits to true --- lib/Catmandu/Store/ElasticSearch/Bag.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Catmandu/Store/ElasticSearch/Bag.pm b/lib/Catmandu/Store/ElasticSearch/Bag.pm index bb18608..0550a34 100644 --- a/lib/Catmandu/Store/ElasticSearch/Bag.pm +++ b/lib/Catmandu/Store/ElasticSearch/Bag.pm @@ -265,6 +265,7 @@ sub search { else { $es_args{body}{from} = $start; } + $es_args{body}{track_total_hits} = \1; $res = $self->store->es->search(%es_args); }