Skip to content

Commit

Permalink
default to 'and' operator for author search, prevents author results …
Browse files Browse the repository at this point in the history
…to show up for e.g. 'dbix class'
  • Loading branch information
monken committed Oct 28, 2011
1 parent 2d7f958 commit d28060b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/MetaCPAN/Web/Model/API/Author.pm
Expand Up @@ -37,9 +37,13 @@ sub search {
query => {
bool => {
should => [
{ text => { 'author.name.analyzed' => $query } },
{ text => { 'author.pauseid' => uc($query) } },
{ text => { 'author.profile.id' => lc($query) } },
{ text => {
'author.name.analyzed' =>
{ query => $query, operator => 'and' }
}
},
{ text => { 'author.pauseid' => uc($query) } },
{ text => { 'author.profile.id' => lc($query) } },
]
}
},
Expand Down

0 comments on commit d28060b

Please sign in to comment.