Skip to content

Commit

Permalink
author by id: move ES query to new API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyn committed Nov 20, 2016
1 parent 74d3d8e commit 7ab1853
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/MetaCPAN/Web/Model/API/Author.pm
Expand Up @@ -30,17 +30,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_id?id=' . join ',', @author );
}

sub search {
Expand Down

0 comments on commit 7ab1853

Please sign in to comment.