diff --git a/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm b/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm index 387221e4c9..62d1e1fb0d 100644 --- a/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm +++ b/lib/MetaCPAN/Web/Controller/Recent/TopUploaders.pm @@ -33,13 +33,10 @@ sub topuploaders : Private { $c->stash( { authors => [ - sort { $b->{releases} <=> $a->{releases} } map { - { - %{ $_->{_source} }, - releases => - $data->{counts}{ $_->{_source}->{pauseid} } - } - } @{ $authors->{hits}{hits} } + sort { $b->{releases} <=> $a->{releases} } + map +{ %{$_}, + releases => $data->{counts}{ $_->{pauseid} } }, + @{ $authors->{authors} } ], took => $data->{took}, total => $data->{total}, diff --git a/lib/MetaCPAN/Web/Model/API/Author.pm b/lib/MetaCPAN/Web/Model/API/Author.pm index c0675ed283..a0e71604bf 100644 --- a/lib/MetaCPAN/Web/Model/API/Author.pm +++ b/lib/MetaCPAN/Web/Model/API/Author.pm @@ -32,18 +32,7 @@ sub get { return $self->request( '/author/' . uc( $author[0] ) ) if ( @author == 1 ); - return $self->request( - '/author/_search', - { - query => { - constant_score => { - filter => { ids => { values => [ map {uc} @author ] } } - } - }, - size => scalar @author, - } - ); - + return $self->request( '/author/by_ids', { id => \@author } ); } sub search {