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 committed Nov 23, 2016
1 parent bb95a1b commit d29d96e
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 d29d96e

Please sign in to comment.