Skip to content

Commit

Permalink
Use the "simple" endpoint in the module model's first method
Browse files Browse the repository at this point in the history
Not only does this move one more method to using the api rather than ES
directly, it also fixes "lucky" redirection test that were broken by the
changes to the web search.
  • Loading branch information
jberger authored and oalders committed Jan 31, 2017
1 parent cb52cf4 commit cad0e22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Web/Model/API/Module.pm
Expand Up @@ -66,7 +66,7 @@ sub search_web {
sub first {
my ( $self, $query ) = @_;
my $cv = $self->cv;
$self->search( $query, { fields => [qw(documentation)] } )->cb(
$self->request( "/search/simple", undef, { q => $query } )->cb(
sub {
my ($result) = shift->recv;
return $cv->send(undef) unless ( $result->{hits}->{total} );
Expand Down

0 comments on commit cad0e22

Please sign in to comment.