Skip to content

Commit 53009df

Browse files
committed
search on profile.id as well
1 parent 167c893 commit 53009df

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/MetaCPAN/Web/Model/API/Author.pm

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ sub search {
3838
bool => {
3939
should => [
4040
{ text => { 'author.name.analyzed' => $query } },
41-
{ text => { 'author.pauseid' => uc($query) } }
41+
{ text => { 'author.pauseid' => uc($query) } },
42+
{ text => { 'author.profile.id' => lc($query) } },
4243
]
4344
}
4445
},
@@ -50,8 +51,8 @@ sub search {
5051
sub {
5152
my $results = shift->recv
5253
|| { hits => { total => 0, hits => [] } };
53-
$cv->send( {
54-
results => [
54+
$cv->send(
55+
{ results => [
5556
map { +{ %{ $_->{_source} }, id => $_->{_id} } }
5657
@{ $results->{hits}{hits} }
5758
],

0 commit comments

Comments
 (0)