Skip to content

Commit

Permalink
Fix 'total' extraction in Elasticsearch 7
Browse files Browse the repository at this point in the history
  • Loading branch information
danmichaelo committed Jun 12, 2023
1 parent 5151cca commit f7ee2ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Catmandu/Store/ElasticSearch/Bag.pm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ sub search {
my $docs = $res->{hits}{hits};

my $hits
= {start => $start, limit => $limit, total => $res->{hits}{total},};
= {start => $start, limit => $limit, total => $res->{hits}{total}{value},};

if ($bag) {
$hits->{hits} = [map {$bag->get($_->{_id})} @$docs];
Expand Down

0 comments on commit f7ee2ee

Please sign in to comment.