Permalink
Browse files

default to 'and' operator for author search, prevents author results …

…to show up for e.g. 'dbix class'
  • Loading branch information...
1 parent 2d7f958 commit d28060bb2fdd284d25b573fb24986f433515bfe2 @monken monken committed Oct 28, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/MetaCPAN/Web/Model/API/Author.pm
@@ -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) } },
]
}
},

0 comments on commit d28060b

Please sign in to comment.